Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

componentwillreceiveprops hooks

SomeComponent (props) => {

    useEffect( () => {
        console.log('someProp updated');
    }, [props.someProp])


    return <div>Hi {props.someProp}</div>
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #componentwillreceiveprops #hooks
ADD COMMENT
Topic
Name
3+1 =