re-rxjs / react-rxjs

React bindings for RxJS
https://react-rxjs.org
MIT License
542 stars 17 forks source link

Question - Todo App Demo #275

Closed gleisonkz closed 2 years ago

gleisonkz commented 2 years ago

Hi guys, first off, I want to say I love this library and the way it integrates with React.

I was reading and doing some tests using the Todo App provided by the docs, and I'm trying to make the application start with some todos loaded from an API call, but I don't think the way I did here is it right.

It doesn't fell right calling .subscribe mannualy from state file.

The getUsers function is inside api folder.

Can you guys take a look at this or suggest to me what would be the better way of doing this?

https://codesandbox.io/s/react-rxjs-basic-todos-9snq9w?file=/src/api/getTodos.ts

thanks