I would like to make useEffect method, which is calling when any prop is changed but not all the code, just a single one dedicated for this props
I imagine something like that ... In this moment all the code is called whed one, two or three is changed.
const SomethingComponent = (props: any) => {
const {one, two, three} = props;
useEffect(() => {
if(something for one props){
code for one
}
if(something for two props){
code for two
}
if(something for three props){
code for three
}
}, [one, two, three]);
}