I use this pattern all the time but using different names.
Usually I create a Container component that implements the behaviour (and do more stuff like redux store connection) and pass properties to the Dumb component that just does rendering according to the props.
As an example:
functionSomeContainer(props){constonContinue=useCallback(()=>{console.log('Just clicked');});return<SomeComponentonContinue={onContinue}/>}functionSomeComponent(props){const{onContinue}=props;return(<div><span>You can continue now</span><buttononClick={onContinue}>Continue</button></div>);}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I use this pattern all the time but using different names.
Usually I create a
Container
component that implements the behaviour (and do more stuff like redux store connection) and pass properties to theDumb
component that just does rendering according to the props.As an example: