Skip to content

useState and useHooks in HTML

first of all, I can not use the “create-react-app” command in the current project. so here I am trying to add my react code into a plain HTML file. Here are my codes for HTML and js files. can anyone tell me why my hooks and setState don’t work properly? Please guide me to solve it. my like_…

Vuetify table not showing data

I am new to the vuetify and having a headache with displaying table. I searched others and tried them on mine but its not showing… shows data on dev tool I can see my data with dev tool but it wont show on the table ;~; Here are my codes Vuetify Table Code BoardList.vue script part api/board.js I tried …

How to replace text with a random array element?

I am trying to replace text with a random element in my array. When the user clicks on the text itself, the word should change to one of the elements in my array. I am having trouble with the function that lets me do so. I have text and wrapped span tags (named “hare”) around words that I want to

How can i get the number of times a word is in an array?

Suppose i have an array of objects: const arrayOfItems = [{id: 1, title: “Pizza”}, {id: 2, title: “Pizza”}, {id: 3, title: “Pasta”}] How can i get the number of times Pizza is in the array? I am building a simple add to cart functionality in JS where i want to show how many…