One Store To Rule Them All
Basically will produce a WebSockets/Single Entry API that you can call:
"modelName": 'attributeName' 'attributeName'
and then the React will update the children.
React Ideas
GraphQL
Still I can't decide between the GraphQL
of facebook:
Component { return `{ modelName: { attributeName1, attributeName2 } }`; }
Simple JSON Query
var needThis = needThis; // or just null? Component { return modelName: attributeName1: needThis attributeName2: needThis attributeName3: needThis ; }
One store with Socket.IO
Simple JSON
var store = ;var needThis = needThis; Component { this; } { store; }
Modeling
- ID is just a string. you can render it the way you want, but it must be unique for not having problems.
- All the data will be stored in
this.data
- Fucking simple implementation.
User.find(id)
will return a Promise: if there is something on the cache, it will provide it, but add a request to the dispatcher to grab a new copy. - 20ms between each request. so we'd request one time and then refresh the cache.
OO Classes
{ return thisdata_id; } { return thisdatax thisdatay }
Wrappers
{ return thisslug; } moduleexports = ;
Wrapper in a store
// models/message.js var store = ; // the only store { return `::`; } moduleexports = store; // store.js var NeedThis = ; { return "ws://localhost:8001/"; } { return "ws://localhost:8001/"; } moduleexports = ;