DEV Community

loading...

Discussion on: Recreating the material design ripple effect in React

rohanfaiyazkhan profile image
Rohan Faiyaz Khan Author

Oh yeah absolutely. You actually don't need to nest the children inside the ripple in that case. You would do something like this:

<ParentComponent>
   <ChildButton onClick={someHandler} />
   <Ripple />
</ParentComponent>

You might want to be a little concious of the event bubbling if you are using this approach.

Thread Thread
dustinkiselbach profile image
dustinkiselbach

Thanks so much!