-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Getting Started - Step 6 is overloaded #1880
Labels
Comments
Thanks for the feedback @andrewseguin. I think those are some good changes to make also. |
HI @andrewseguin , Are you planning to open the PR, please let us know. |
Hi @brandonroberts , Will work on it. |
@santoshyadav198613 wait until #1819 lands before opening another PR. |
Ok all the comments are taken care,but let me check with Wes and Tim |
ptouchton
pushed a commit
to ptouchton/platform
that referenced
this issue
Jul 21, 2020
…ore detailed. closes ngrx#1880
2 tasks
ptouchton
pushed a commit
to ptouchton/platform
that referenced
this issue
Jul 23, 2020
…ore detailed. closes ngrx#1880
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The step 6 of the Getting Started guide may need to be broken down into a few extra steps.
Current Documentation
Feedback
The step tells you to create a new component, but does not tell you which files to create (e.g. template, styles, logic).
It tells you to inject the Store before telling you what your component logic looks like, and the next paragraph seems to talk about templating, not logic.
The template references methods and properties that are not yet introduced to the user (
"buttons to call the increment, decrement, and reset methods"
,"subscribe to the count$ observable"
)The next paragraph tells you to update your component logic, but as a user, I still don't have any yet because you haven't told me where to start (
"Update the MyCounterComponent class with a selector for the count"
)Nitpicks:
../counter.actions
, but it wasn't stated that the files should be in a nested folder.MyCounter
component but it is calledMyCounterComponent
in the codeSuggestion
I suggest that step 6 should be based on helping the user setup a new component with stubs for NgRX parts. Step 7 can be for adding the component to the module and app template. Then, step 8 can focus on what it looks like to add NgRX to a component.
I'd also consider adding a completed StackBlitz example at the end for the user's to check out in case they messed up somewhere and just want to see the final result.
my-counter.component.ts
in theapp
folder that will define a new component calledMyCounterComponent
. This component will render buttons that allow the user to change thecount
state.my-counter.component.ts:
Step 7: Add the new component to your AppModule's declarations and declare it in the template:
app.component.html
app.component.ts
Step 8: Inject the store into
MyCounterComponent
and connect thecount$
stream to the store'scount
state. Implement theincrement
,decrement
, andreset
methods by dispatching actions to the store.my-counter.component.ts:
The text was updated successfully, but these errors were encountered: