loading...
Cover image for Keeping browser tabs in sync using localStorage, NgRx, and RxJS
Angular

Keeping browser tabs in sync using localStorage, NgRx, and RxJS

timdeschryver profile image Tim Deschryver Updated on ・1 min read

In this post, we're going to take a look at how we can keep application state in sync when a user has multiple tabs open. We're going to make this happen by using the Web Storage API, NgRx (Store and Effects), and RxJS. A basic knowledge of NgRx is needed to follow the examples.

There are two ways of syncing state that I know of. One of them is to send the actions from one tab to another tab, the other is to send the (partial) state from one tab to another tab. While both of them have a very similar implementation, they both shine in their own way.

As a starting point, we're going to pick up where we left off in a previous post "Let's have a chat about Actions and Action Creators within NgRx" where we created a simple grocery list.

Read More...

Posted on by:

timdeschryver profile

Tim Deschryver

@timdeschryver

NgRx team member - Writer for AngularInDepth

Angular

This is where we write about all things Angular. It's meant to be a place for Angular community and people interested in Angular and the Angular ecosystem.

Discussion

markdown guide