skip to Main Content

State change doesn't show dialog in React Native View

I've got a state to show a dialog inside a React const [isConfirmationDialogVisible, setConfirmationDialogVisibility] = useState(false); I set the visibility state when a button is clicked: <Button id={item.id} onPressCallback={() => setConfirmationDialogVisibility(true)} /> The visibility state is passed on to the…

VIEW QUESTION

Reactjs – React rerendering

I have component const ComponentA: React.FC<ComponentAProps> = (props) => { const [invalidFields, setInvalidFields] = React.useState([]); return ( <ComponentB invalidInputs = {inavlidFields.length !== 0} /> ) Does component B rerender when the state invalidFields changes?

VIEW QUESTION
Back To Top
Search