David Torres
David Torres

Reputation: 23

How to share component logic with other components in a clean way on react native?

I'm kind of new to react, right now i'm making app on react native that will have a single instance of a timer, this timer should be able to be controlled (start, pause, stop, restart) from different components, but i find a bit tedious to pass this instance as a prop to every child component. Is there a better/cleaner way to do this ?

Upvotes: 0

Views: 61

Answers (1)

Gilbert Nwaiwu
Gilbert Nwaiwu

Reputation: 728

You should properly learn to use redux or any other flux implementation.

Upvotes: 1

Related Questions