It would be nice to have something like that for words change action:
textChange(textLoopState){
// do something...
}
<TextLoop onChange={textChange}>
{wordsObj}
</TextLoop>
My proposal:
// TextLoop.jsx
tick = () => {
this.setState((state, props) => {
+ if(this.props.onChange){
+ this.props.onChange(state);
+ }
...
});
};
It would be nice to have something like that for words change action:
My proposal:
// TextLoop.jsx tick = () => { this.setState((state, props) => { + if(this.props.onChange){ + this.props.onChange(state); + } ... }); };