you are not far off at all.
here's a how to, with code examples: https://levelup.gitconnected.com/the-easiest-way-to-keep-ngrx-state-after-refresh-rehydrate-it-from-localstorage-8cd23b547aac?sk=ae2bd92d71ec3d45736ca05aa8107c66