-
-
Notifications
You must be signed in to change notification settings - Fork 2k
chore(Platform): Integrate example-app #12
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
Conversation
* and recalculating new states. This enables powerful time-travel | ||
* debugging. | ||
* | ||
* To use the debugger, install the Redux Devtools extension for either |
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.
Is the instrumentOnlyWithExtension()
functionality baked into instrument()
now?
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.
Yes, there is now just one API for instrumentation regardless of strategy.
277a201
to
cedb2fb
Compare
@MikeRyanDev the router state is not serializable because it has a cycle. Breaking the cycle would be a breaking change in the router and will have some negative implications on dev ergonomics. Is there a way to insert a function serializing the state? |
@vsavkin Yes, we can write a custom serializer/parser for the dev tools that handles router state in a special way. The interface for these will have to be something like: function serialize<T>(state: RouterState): T;
function revive<T>(state: T): RouterState; where |
@MikeRyanDev I can write one if needed. Quick question though: Why does it have to be serializable at all? |
@MikeRyanDev Just FYI (you're probably already aware), |
cedb2fb
to
3ae33a4
Compare
@@ -187,7 +187,6 @@ describe('ngRx Store', () => { | |||
|
|||
dispatcher.ngOnDestroy(); | |||
|
|||
expect(storeSubscription.closed).toBe(true); |
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.
@MikeRyanDev this test was failing as the storeSubscription
is no longer closed. It didn't show up until I upgraded RxJS. Is this a change in behavior?
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.
Yeah, I'm seeing the same thing. I think this behavior changed in newer versions of rxjs.
bb4700b
to
ab6ddfd
Compare
@MikeRyanDev this branch is up-to-date and ready for another review |
* from feature modules. Effects can be loaded | ||
* eagerly or lazily and will be started immediately. | ||
* | ||
* All Effects will only be instantiated regardless of |
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.
"instantiated once"
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.
Fixed
actions$ = TestBed.get(Actions); | ||
}); | ||
|
||
describe('search$', () => { |
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 hope you are prepared to start supporting marble testing questions... 😄
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.
😎
constructor( | ||
private actions$: Actions, | ||
private googleBooks: GoogleBooksService, | ||
@Optional() @Inject(SEARCH_SCHEDULER) private scheduler: Scheduler, |
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 would maybe add a comment about why these are necessary for testability purposes.
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.
Fixed
} | ||
|
||
/** | ||
* The compose function is one of our most handy tools. In basic terms, you give |
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 think many of these comments apply anymore. Maybe add a comment about what createSelector
does?
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 not need the comments for showing how the reducerFactory
works?
a93862e
to
47a3d33
Compare
47a3d33
to
35be189
Compare
35be189
to
af886c5
Compare
Thank you! |
Is it planned that example app does not work after merging this? |
I get this on
macOS 10.12.5 |
@sharikovvladislav it's a known issue with the CLI. If you save any file and let it recompile it will complete successfully |
@brandonroberts Ok, if I recompile everything is ok. Lets assume it is not problem. Now I don't have error. But when I open
Was that planned? =) |
@sharikovvladislav no 😄 I saw that issue before, but not consistently. Try changing |
@brandonroberts That does not work. Same result. A bit another message (because of path changed): |
Ok. I'll take a look into it |
Note that I run |
@brandonroberts I don't know how it is possible, but now everything works fine. I checked in Chrome and Chrome Canary Some time ago I wanted to make a PR to fix e2e tests. I fixed root problem (that was in ngrx/example-app repo) but now angular application can not be detected in test run. May be this is related to:
What do you think? Do you know issue number in angular-cli? |
Migrates the example-app into the monorepo. This makes the example-app a viable target for complete ngrx integration tests. Right now the app mostly works. Things that block this PR:
yarn run clean:ts
before trying to start the development server.undefined
injector errors, see Eager providers and Injector.get() can cause errors angular/angular#15501