Skip to content
Advertisement

Tag: reactjs

Copy/Paste of Reactjs-Popup Example from the site does not work with useState

I’m trying out example code provided by Reactjs-Popup at https://react-popup.elazizi.com/controlled-popup/, but it doesn’t seem to work. I pretty much copy/pasted the code. What am I missing? I can make the popup to work if I remove all references to “useState”. index.js ControlledPopup.jsx Answer I think your problem comes from the way you’re trying to render your component in index.js. Since

How to send a component as an argument to a function in another component?

In my case, I have a components ‘1,2,3,….’ imported in another main component ‘A’. In component ‘A’ some operation is done and among the components ‘1,2,3…’ one filtered component is returned. I have to send some props to this filtered components and render this filtered component. Am posting my code please have a look. Thank you. AR008Users and AR009Users are

I want to connect react and firebase

I have problem with Firebase and React. This problem is after click to my add-data button for adding data to database. I get this console.log Reference_impl.ts:482 Uncaught TypeError: db._checkNotDeleted is not a function at ref (Reference_impl.ts:482:1) at insertData (Modal.js:44:1) at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1) at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1) at invokeGuardedCallback (react-dom.development.js:4277:1) at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4291:1) at executeDispatch (react-dom.development.js:9041:1) at processDispatchQueueItemsInOrder (react-dom.development.js:9073:1) at processDispatchQueue (react-dom.development.js:9086:1)

How to count values without the duplicate in react

Language used : js with react I need to count how much “theme” I have but not if he’s already count/exist data example : Here, i have two theme : love and horror. I know how to get the number of theme but i don’t want to count the duplicate, so here i only want to get “2” and no

Shuffling in react

I am fetching data from an api.Trying to make quiz application from the data of an API.I have selected random countries and their respective capitals and map them to my quiz application.I have achieved this already.Now i am trying to shuffle my answer options but not able to do that.anybody can please help? Here is my code I have applied

Advertisement