0

I am trying to build an react app where i need to pass a JSON of size more than 4MB in between routes / components.

I tried passing as query params in route, the url changes to blank..How can this be done in react.

Nithila
  • 303
  • 1
  • 6
  • 19
  • You need redux, and then you can store data in redux store and pass it to your child components using connect. @Nithila can you use redux ? – Žarko Selak Sep 01 '16 at 10:41

1 Answers1

1

It's probably not a direct answer but if you are starting a new app I would recommend you to use Redux with react-redux.

Redux is a predictable state container for JavaScript apps.

It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of that, it provides a great developer experience, such as live code editing combined with a time traveling debugger.

It's very small library so it's easy to understand how everything works. It might be a good solution to your problem.

Todo app example
You can also check out awesome egghead.io free tutorial - Getting Started with Redux

Here is the answer about the redux benefits by its author Dan Abramov

Community
  • 1
  • 1
Dmitriy Nevzorov
  • 6,042
  • 1
  • 20
  • 28