Replies: 2 comments 11 replies
-
The repository is responsible for querying and updating the store. You'll still create a service for backend interaction.
Yes, I don't see something "wrong" with this. You can use a constant for the key and use it in both places.
No. I think it's straightforward. It's also very similar to Akita in the way of thinking. todos and todos-1 are just the key names. todos for example is the whole todos list, and todo-${id} is a single todo. Think of a master-detail page.
I'm not sure I follow. Please share a code example.
imagine a table where you first fetch the minimum required data to quickly show a row ( this is a
You can use https://ngneat.github.io/elf/docs/miscellaneous/registry#getstoressnapshot |
Beta Was this translation helpful? Give feedback.
-
@NetanelBasal I'm trying to setup a small example that use an API in an angular app. Based on the todo demo and the doc Is it possible to create the store and it's initial state inside the repository? Like it is with akita? Also, with an angular approach, is there some class I should extend in the repository? That might provide directly the createRequestStatusOperator or similar? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm investigating Elf for our next web-app. This will be kind of a big app, since it will merge our 5 existing desktop applications into one web application. We plan to develop it through the next 5 years with the full team(6 dev), so I'm looking for guidance for what would be the best practices using Elf.
Previously with Akita, the service was here to check everything before executing udpates on the store, but now with Elf, the only example with a service I found was to initialize the store with data from a service. But how should edit/delete/add call to the server be managed? In the end should we still only use the Service that will call the server and then update the repository? Or am I missing something?
Also a few questions:
Beta Was this translation helpful? Give feedback.
All reactions