rintoj / statex

StateX is a state management library for modern web applications with unidirectional data flow and immutable uni-state (just like redux)
MIT License
68 stars 18 forks source link

What is the purpose of your services in the examples? #7

Closed Nxt3 closed 6 years ago

Nxt3 commented 6 years ago

For the todo-ng-ts example, you have a service called TodoService but it doesn't appear to do anything. Am I missing something?

rintoj commented 6 years ago

Ideally TodoStore must use TodoService to perform actions such as calling APIs, then update state accordingly. This example is not demonstrating it correctly.

https://github.com/rintoj/statex/blob/5dddc078bfa7a194065153ec4b074e6e5788ed05/examples/todo-ng-ts/src/store/todo-store.ts

Nxt3 commented 6 years ago

Ah, okay. That's what I thought. The TodoService does nothing in the example. Thank you!