react native props.setvisible
[react native] Warning: Cannot update a component from inside the function body of a different component.
[react native] Warning: Cannot update a component from inside the function body of a different component.
2021.01.07Warning: Cannot update a component from inside the function body of a different component. App.js const [visible, setVisible] = useState(false); Component.js export default (props) => { return ( /> ) } 부모에서 Modal 을 View 한 후에 (Component.js) Button 을 클릭하면 props 으로 넘어온 부모의 state 를 setvisible(false) 로 modal 을 닫으려 했다 Warning: Cannot update a component from inside the function body of a different comp..