I come here after two whole days without success. I want to increment my array with the pictures selected by the User, for return to my database a list of uri. But when the user choosed the first picture and re-open the android navigator for take a new picture, I saw the array doesn’t increment. It take…
Tag: reactjs
.push( ) is not updating the variable
I am trying to push the data that is set using setData function to datas[ ]. I am able to push the data once, but the 2nd time when I push it, instead of being stored at datas[1], it replaces datas[0]. What am I doing wrong here. Thank you in advance. Answer App is getting re-rendered whenever you change stat…
How do arrange arrays with different combinations?
I have 3 arrays [“s”,”m”], [“Red”,”Black”], [“1”, “2”]. I want to arrange them like this: I’m out of idea, please help me. Answer Loop each one then just combine them into an array. Script: Output:
Add a Mapbox marker on double click event using React
I’m having some difficulties making my code work. I’m working on an interactive map and I want to add a function that when users “double click” it allows them to add a marker, the function is supposed to pull the long and lat from the map itself. I have this for the part where the func…
I am trying to draw circles and add popup on a map, but i keep getting errors. Cannot read properties of undefined (reading ‘lng’)
This piece of code is from my App.js I am using this as the default location of the map once the app opens const [mapCenter, setMapCenter] = useState({lat: 34.80746, lng: -40.4796}); I use this to update the location of the map, as selected from the dropdown menu, I am getting the lat and lng from data pulled…
How to navigate errors showing after I run React Native app on Mac with command ‘react-native run-android’?
I run the app with the command “react-native run-android” and it worked. But after logging in the app with user login info, it shows black error screens and following is the error message. As seen in the error message, error is located at many places but I assume it’s not like that. What I a…
Updating Next.js App Components After User Login
I have a static 2-page Next.js app that I want to integrate a user-based system with. I’ve decided to use Auth0 for authentication. My goal is to let a user see documents that they have saved on my app, similar to Grammarly, but I am not sure how the entire UI will conditionally change after the user ha…
context.putImageData() Not working in React
Im trying to create a drawing application in react, its working for the most part. But when i try add an undo button it doesnt work. I try make the undo button with this finishDrawing() function, where i use getImageData and store it in an array called restore_array then when a Undo button is clicked i try to…
Why my green border doesn’t toggle?(disappear)
Why I can’t toggle the className in each div? I want to give each div a green border when I double click on h1 tag inside each div and when I double click again I want border to disapper I put image for you to understand my situation If you don’t get the problem comment under the question Answer C…
REACT- Why using ‘style’ with react-draft-wysiwyg is not working?
Is there a way to delimit my textboxes in a rectangle and give a default height for them ? I tried using style in my <Editor /> but it’s not working. Here my code Answer Maybe you need to use editorStyle={{ height: 200, margin: 12,borderWidth: 0.5,padding: 10,borderRadius: “2px” }} att…