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

Chapter 10 - NgRx has missing imports/exports that are difficult to guess #16

Open
samspot opened this issue Jan 4, 2021 · 1 comment

Comments

@samspot
Copy link

samspot commented Jan 4, 2021

Hi, great book so far! I've been able to get everything working up to this point. I think a small update to this file in chapter 10 would enhance the book.

counter.action.ts is missing the import for createAction. I believe it should be import { Action, createAction } from '@ngrx/store';

counter.action.ts does not export anything for CounterActions which are later used in counter.reducer.ts I've had no success figuring this one out and wasn't able to complete the exercise.

@timofeysie
Copy link
Contributor

I think I encountered this issue also. My notes show that there is a CounterState and a AppState interface. It doesn't seem right to have to type state.counter.counter.

The official example counter code and Duncan's code have some differences. They border on pseudo code and serve mainly to introduce the key concepts of NgRx which are used in the following sections of the "Enterprise" implementation, so you shouldn't let this error stop you progressing to the next section.

I did write a blog post my self about implementing the official counter example in an Nx/Angular setting. Not sure if you're still at this stage anymore. I wish I saw this issue earlier as I might have been able to help.

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

No branches or pull requests

2 participants