Good morning,
I'm having an issue understanding how Sequelize and RxJS work together. From what I read, Sequelize uses promises. Now, what happens if I want to load a list and render everytime an element is found in my database ? I'm using this syntax from sequelize:
User.findAll().then()
But what i want is to have this wrapped in an observable and be able to use :
var getAllUsersObservable = Rx.Observable.create(function (obs) {
obs.next(user)
}
Then my observer just want, let's say, to print the new user.
var getAllUsersObserver = {
next: console.log(user)
}
To me, this will not work because Sequelize will only put the list of all my users in its promise when it's done finding all users. My question is : how do I use these two together to have my users being printed, one at a time?
Thanks in advance