Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

investigate api data shape #18

Open
nikrb opened this issue Dec 7, 2017 · 5 comments
Open

investigate api data shape #18

nikrb opened this issue Dec 7, 2017 · 5 comments
Assignees

Comments

@nikrb
Copy link
Contributor

nikrb commented Dec 7, 2017

investigate data format for api comms.

checkout twilio to see how they do it.
useful link:
redux dox
normalizr with redux

@nikrb nikrb added the feature label Dec 7, 2017
@nikrb nikrb self-assigned this Dec 7, 2017
@nikrb nikrb added enhancement and removed feature labels Dec 7, 2017
@nikrb
Copy link
Contributor Author

nikrb commented Dec 7, 2017

changed feature to enhancement ... whilst we are here to learn, currently feeling well out of my depth.

How will reselect work with service worker? They both cache request data?

@nikrb
Copy link
Contributor Author

nikrb commented Feb 13, 2018

is it sufficient to have single global redux state for working and error, or does each 'module' require their own? Strictly speaking this is just frontend and not api related.

@vivekimsit
Copy link
Contributor

As far as I know your app should have only single state tree.

@nikrb
Copy link
Contributor Author

nikrb commented Feb 14, 2018

agreed. Does that tree have one global for working type situations and errors, or should each sub-tree have its own?
e.g.

{
isWorking: false,
hasErrored: { false, message:""},
user: { ... },
houses: { ... },
...
}

OR

{
user: { isWorking: false, hasErrored: {false, message: "", userData: {...}},
houses: { isWorking: false, hasErrored: {false, message: "", housesData: {...}},
}
...

@Mortuie Mortuie added the hold label Mar 25, 2018
@Mortuie
Copy link
Contributor

Mortuie commented Dec 21, 2018

@nikrb 2nd one. Otherwise how do you differentiate the errors :( Although the user will probably be only using one of the state trees.... Idk?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants