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

[future] How to do Redux store (if we do it again) #128

Closed
rufuspollock opened this issue Mar 9, 2017 · 1 comment
Closed

[future] How to do Redux store (if we do it again) #128

rufuspollock opened this issue Mar 9, 2017 · 1 comment
Labels
Milestone

Comments

@rufuspollock
Copy link
Member

Various "notes to self" about we do Redux store if we do it again (from mid Feb)

Our app state (redux store):

{
  # maybe only one data package - but what about publisher page ...
  # theDataPackage: {},
  packages: {
    #  id looks like "publisher/name"
    "{id}": datapackageDescriptor - normalized ...
  },
  resources: {
    "{dataPackageId}::{idx}
  },
  views: {
    "{dpId}::{viewIndex}"
  }
  dataPackageResourcesByName: # do we need this ...
  # data package resource data - maybe we should name that way ...
  blobs: {
    "{resourceId}": ...
  }
}

Note:

  • We need a unique id for every object.

FAQ

## How to handle nested entities like DataPackages?

http://redux.js.org/docs/recipes/reducers/NormalizingStateShape.html
http://redux.js.org/docs/recipes/reducers/UpdatingNormalizedData.html

Asynchronous Data

http://redux.js.org/docs/advanced/AsyncActions.html

reduxjs/redux#99 - Best async loading technique (old issue)

Various options:

Structure for actions - use https://github.com/acdlite/flux-standard-action

{
  type: 'ADD_TODO',
  payload: 'xxx'
  error: true
}
@rufuspollock rufuspollock added this to the Icebox milestone Mar 9, 2017
@rufuspollock
Copy link
Member Author

INVALID. Not an issue and now very obsolete.

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

No branches or pull requests

1 participant