Replies: 2 comments
-
If it was implemented can you provide an example code how it will be used? Please keep the examples for the minimal code with only the relevant parts for us to understand. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm closing the discussion let's move it to an issue instead. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First off, great idea for a library. I am looking for something like this because I'm working on a project that uses react-native-video, and we need to store the current playback position of the media file in state (which updates several times a second), which a lot of other functions end up referencing.
Because of this requirement, a lot of the useCallback functions we have end up needing that playback position as a dependency, which means those functions must get re-calculated on every single render, tanking the performance of our app.
Your solution seems virtually ideal to solve the problem we have, with one minor issue. To (marginally) help improve the performance of the component in question, we converted all the useState calls to a single useReducer and dispatch functions.
Would it be difficult to adapt this code so it can work with useReducer as well?
Beta Was this translation helpful? Give feedback.
All reactions