All Questions
7 questions
0
votes
2
answers
43
views
I cannot get both the name and the email together in App.js through 'main' object
I'm trying to get both the name and email value in App.js through handler, but I cannot get the name and only get the email value through object state.
AddContacts.js :-
let [main, setMain] = useState(...
1
vote
1
answer
527
views
My React Component not re-render when my array object properties is changed
Hello I'm just new in React. I have a react component that shows list users. The data was from array of object.
When I fetched new data that changed the properties in object the component was not re-...
3
votes
1
answer
89
views
Make input field populate with today's date when user clicks on the select option
When the user clicks the option value "apple" for example, the input field should automatically populate with today's date.
Here's my code
import "./styles.css";
import React, {...
0
votes
2
answers
2k
views
Having problem in changing css using useState in react
I'm trying to build a modal in react. When it's opened, the background or the body color must change to a darker one and the modal should open, when closed, everything must go back to normal.
I tried ...
1
vote
1
answer
1k
views
React if statments always results in false condition after state re-render
I have this Component in react which will return 'Loading' title, 'Logged in' title or 'Not Logged in' title, depending on the state.
I have made the state so that it updates and changes from 'Loading'...
1
vote
2
answers
2k
views
How to update multiple states using Immutability Helper | React JS
I am new to Immutability Helper React library, and I am trying to update multiple state values at the same time, but only the last calling method state is getting updated.
this is what I tried:
...
584
votes
25
answers
626k
views
React - changing an uncontrolled input
I have a simple react component with the form which I believe to have one controlled input:
import React from 'react';
export default class MyForm extends React.Component {
constructor(props) {
...