Replies: 2 comments
-
That's not a dummy data. That's the initial data. If you don't want to pass it make it optional. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I ended up creating a dummy EMPTY value that can be compared everywhere. It's a bit ugly, but solves the problem. Ideally it would be possible to sequence the creation of the store to occur after the data has loaded and the initial data is available. That way the store could have a type that only allows data to exist and dummy data wouldn't be necessary. Alas... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not sure how to best use Elf. All the examples show the store initialized with dummy data. This forces the store type definition to allow undefined/null for parameter values (e.g.
user: null
in the examples). I'd like to avoid this and have strictly typed state. In the past I've used Angular resolvers to load data from the server and initialize the state before any components are instantiated.What is the recommended way to do this with Elf?
Beta Was this translation helpful? Give feedback.
All reactions