Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Stage 4: Start and stop functionality extracted outside of componenent and are controlled by 'ref' from parent There are some problems with this model. When the parent rerenders (because of parent state/prop change) the child (confetti component) will also rerender. Then all the local properties with our Confetti component will reset (as it is a stateless functional component). And our component will give some undesired result. 1. Start and stop may not work. 2. On component unmount the animation callback won't be cancelled * fix Co-authored-by: A M Akankshit <akankshit.am@ET-C02YQFZGLVCF.local>
- Loading branch information
Showing
2 changed files
with
49 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters