I'm working on a react project and we have a video media streams and I want to store the stream objects in my redux store but as far as I know storing non-serializable objects is not a good practice for redux, but I found some answers on google saying that redux saga should be used but no one says how? I tried redux saga but I still get the non-serializable object error.
Asked
Active
Viewed 579 times
1 Answers
2
No, that kind of data should simply not be put into Redux. You can hold it in a global variable, just outside of React or Redux, but it should not be put into the store.

phry
- 35,762
- 5
- 67
- 81
-
Thanks for the reply, so I just use the context api then – arnodorian067 Aug 15 '21 at 17:25
-
Yes, Context is a dependency injection mechanism, so for something like that it's perfectly suited (unlike for state). – phry Aug 15 '21 at 22:04