[How to add NgRx] - NgRx Store & App State handling by hakonamatata · Pull Request #259 · TrilonIO/aspnetcore-angular-universal · GitHub
Skip to content

[How to add NgRx] - NgRx Store & App State handling - #259

Open
hakonamatata wants to merge 9 commits into
TrilonIO:masterfrom
hakonamatata:ngrx_store
Open

hakonamatata wants to merge 9 commits into
TrilonIO:masterfrom
hakonamatata:ngrx_store

Conversation

@hakonamatata

Copy link
Copy Markdown
Contributor

Added ngrx/store

  • Changed the counter component to use ngrx store instead
  • Router state saved as global state
  • Tested with AOT and server rendering, it works!
  • Updated readme to include an image of redux dev tools in action

Take and remove what you like @MarkPieszak 😉

@pjmagee

pjmagee commented Jun 28, 2017

Copy link
Copy Markdown

@estebanvega

Copy link
Copy Markdown

@pjmagee Could you use https://github.com/btroncone/ngrx-store-localstorage to rehydrate from localStorage. Should work with angular 4.x as well.

@estebanvega

Copy link
Copy Markdown

@hakonamatata @MarkPieszak would it be interesting to see an example of an XHR request to an REST API, which in turn updates the client store via something like https://github.com/ngrx/effects?

@pjmagee

pjmagee commented Jul 10, 2017 •

Copy link
Copy Markdown

@estebanvega @MarkPieszak but what about SSR since ngrx-store-localstorage has browser dependencies? Also what about authentication? When a user is authenticated and the site is refreshed, then authentication is lost from the store...and....do you really want to store that information in local storage? :)

Actually,, SSR seems so pointless right now, many third party components will just break if you have SSR enabled. Things like PrimeNG etc.

@MarkPieszak

Copy link
Copy Markdown
Member

@MarkPieszak MarkPieszak changed the title NgRx/store state handling [How to add NgRx] - NgRx Store & App State handling Aug 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants