Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Keep "layouts" reference in React context, not in Redux store #97

Closed
thangngoc89 opened this issue Jan 24, 2016 · 7 comments
Closed

Keep "layouts" reference in React context, not in Redux store #97

thangngoc89 opened this issue Jan 24, 2016 · 7 comments

Comments

@thangngoc89
Copy link
Contributor

because functions can't be serialized to JSON. This breaks persistState in devTools

@MoOx
Copy link
Owner

MoOx commented Jan 24, 2016

Any exact pointers on what is causing an issue for you?

@thangngoc89
Copy link
Contributor Author

I'm testing on #91

First, save it: http://localhost:3000/?debug_session=foo
Open new tab, go to that address

Receive this in store: pageComponents={}

Basicaly, persistState dump the current state to localStorage. Since functions can't be serialized to JSON, It would break persisState functionality

@MoOx
Copy link
Owner

MoOx commented Jan 24, 2016

Oh I see. Yeah I think we should use react context for this. Don't you think?

@thangngoc89
Copy link
Contributor Author

Yup. Please read my comment at #40

@MoOx
Copy link
Owner

MoOx commented Jan 24, 2016

So will move "layouts" (I just renamed "pageComponents" as "layouts" in master) out of the store, and will use context for this.

@MoOx MoOx changed the title Should not store function inside redux store Keep "layouts" reference in React context, not in Redux store Jan 24, 2016
@thangngoc89
Copy link
Contributor Author

👍

@MoOx
Copy link
Owner

MoOx commented Feb 10, 2016

@MoOx MoOx closed this as completed Feb 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants