Skip to content

RFC - Standalone API #1978

Mar 17, 2023 · 5 comments · 4 replies
Discussion options

You must be logged in to vote

We had a discussion with Mark regarding signatures of these APIs:

provideNgxs(states: StateClass[] = [], config?: NgxsConfig);
provideNgxsStates(states: StateClass[]);
provideNgxsPlugin(plugin: NgxsPlugin);

We had a thought that provideNgxs may only be called with the config, and all of the states are registered using provideNgxsStates. Thus, provideNgxs is only responsible for setting the Store up. But this is not backward compatible with the current implementation because it breaks the order of the executed code.

NGXS has internal actions InitState and UpdateState. InitState is always dispatched once when the NgxsModule.forRoot registers root states provided in forRoot. UpdateState is d…

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@profanis
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@kondelik
Comment options

@Carniatto
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@markwhitfeld
Comment options

Answer selected by markwhitfeld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants