-
Notifications
You must be signed in to change notification settings - Fork 14
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
Document ReduxInjector #14
Conversation
@maier49 the example on the PR is now slightly out of date, I'll comment on the diffs in the morning :) |
This is a real world usage that is up to date https://github.com/dojo/examples/blob/master/todo-mvc-tsx/src/main.ts |
331ec02
to
50eb3f6
Compare
@agubler I updated the example, and also the wording, based on that example. Let me know if the updated wording needs any tweaks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know enough about the ReduxInjector, so it looks good from my point of view but defer to @agubler
README.md
Outdated
*Coming Soon* | ||
`ReduxInjector` can be used to bind a redux store and Dojo 2 widgets using the `registry`. | ||
|
||
An injector can be defined in the registry, which is then registered with the `Router`, and provided to the `Projector` as one of its properties. This is demonstrated in the example below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this sentence, the Router
doesn't have anything to do with the using the ReduxInjector
...
README.md
Outdated
const store = createStore(todoReducer, defaultState, global.__REDUX_DEVTOOLS_EXTENSION__ && global.__REDUX_DEVTOOLS_EXTENSION__()); | ||
registry.defineInjector('application-state', new ReduxInjector(store)); | ||
|
||
const config = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can drop anything router related from the examples (might be confusing)
README.md
Outdated
}; | ||
|
||
const registry = new Registry(); | ||
const store = createStore(todoReducer, defaultState, global.__REDUX_DEVTOOLS_EXTENSION__ && global.__REDUX_DEVTOOLS_EXTENSION__()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might want to call out that this initialises the redux dev tools extension (and maybe a link to it?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this in the readme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope probably not to be honest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the redux dev tools extension from the example code and removed the explanation about it.
@agubler Updated again |
The following has been addressed in the PR:
Description:
Adds the redux injector documentation from the PR to the README
Resolves #9