javascript - React Router v4 - passing state with <Link /> -


i want pass list of objects in state of component. i'm trying pass element doing likes this:

<link      to={{         pathname: `/contributors/${contributor.id}`,         state: {linkstate: this.state.contributors}     }} > 

but console shows error:

uncaught domexception: failed execute 'pushstate' on 'history': symbol(react.element) not cloned.

what mean , can that?

this has been answered @gregbeaver here: https://stackoverflow.com/a/26291578/2079735

https://developer.mozilla.org/en-us/docs/web/guide/api/dom/manipulating_the_browser_history

...

looks simple answer possible state passing in serializing larger 640k

i suggest looking using redux , storing value local state rather history state.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -