How use without React
Hi, I'm building a rethink server using your modules server, client and react to replace layer data in Meteor projects. I want use subscription to changefeeds and simple query, but without React. How I can use this module ? Could you give me a short example without react componet. I don't know how use Subscription Manager and QueryRequest.
thanks.
Take a look at https://github.com/mikemintz/rethinkdb-websocket-client it has an example in the README and a tutorial explaining how to use it without react.
On Thu, Oct 19, 2017 at 12:39 AM eportico [email protected] wrote:
Hi, I'm building a rethink server using your modules server, client and react to replace layer data in Meteor projects. I want use subscription to changefeeds and simple query, but without React. How I can use this module ? Could you give me a short example without react componet. I don't know how use Subscription Manager and QueryRequest.
thanks.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mikemintz/react-rethinkdb/issues/44, or mute the thread https://github.com/notifications/unsubscribe-auth/AACCAPBDHRHiIiLLKbQBtaHs1lphc4Xfks5stvyqgaJpZM4P-0M- .
Hi, I know use with websocket client , but I want use the subscription manager and changefeed what you have developed in this respository. It's nice Thanks
I think you'd have to port it to meteor and change it to adapt to how meteor does lifecycle
On Thu, Oct 19, 2017 at 1:26 PM eportico [email protected] wrote:
Hi, I know use with websocket client , but I want use the subscription manager and changefeed what you have developed in this respository. It's nice Thanks
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/mikemintz/react-rethinkdb/issues/44#issuecomment-338027890, or mute the thread https://github.com/notifications/unsubscribe-auth/AACCAIFTbCtc75ibxcxv6Gc4Xdwz0IuLks5st7CNgaJpZM4P-0M- .
let options = {...};
RethinkCLI.DefaultSession.connect(options);
let q = new RethinkCLI.QueryRequest({
query: r.table('sae_lines').filter(r.row('Status')('CalidadDesfase').gt(70)), // RethinkDB query
changes: true, // subscribe to realtime changefeed
initial: [], // return [] while loading
});
let res = new QueryResult(q.initial, q.transform);
const subscriptionManager = RethinkCLI.DefaultSession._subscriptionManager;
subscriptionManager.subscribe(component, q, res);
I don't know how use your classes to do a simple example of subscription with changefeed. I would appreciate your help to understand the operation with your base classes.
regards