Comments (4)
coconut.data is the official stateful data store and is preferred I suppose. Do you have a reason to not use it and go for deepstate?
from coconut.ui.
i have a project that use deepstate but i want move the ui to coconut for future scalability on other renderers
from coconut.ui.
As far as I understand it, the data is in a DeepStateContainer<T>
and you can make it observable like so:
function tinkify<T>(container:DeepStateContainer<T>) {
var state = new tink.state.State(container.state);
container.subscribeObserver(Full(function (prev, next) state.set(next));//make sure it's prev and next and not next and prev
return state.observe();
}
And as soon as you have an observable, you can pass it to coconut and it will update. I'm a bit worried about the performance implications here, but it should work correctly. Perhaps you also want to create "enclosures" as you pass data down.
All that said, coconut.ui is literally built on top of coconut.data, so gluing in another, radically different state layer is going to require a fair amount of work and the result will probably still be awkward. If you just want different renderers, then that's where you should be putting your energy.
I'm going to close this issue, but please feel free to follow up with questions you run into if you go down this road ;)
from coconut.ui.
thanks @back2dos i will try tinfiy deepstate for see what happens.
from coconut.ui.
Related Issues (20)
- Pull down coconut.ui.Isolated into backends
- Make Slots more lightweight.
- Facilitate initialization.
- Document transformation with @:controlled attributes
- @:loaded doesn't compile HOT 1
- Run some code before first call to render() HOT 1
- @:computed static var does not compile in View
- Top down inference not applied to @:computed.
- Backend for nodegui HOT 1
- hxx shorthand (string literal as function body) is not working for @:attr function
- 1.0 HOT 1
- Make build passes via priority queue.
- Type not found : tink.state.internal.ObservableObject HOT 1
- type is not observable, because type is not observable because the field "_db" is mutable HOT 1
- Bug with Scheduler? "Uncaught (in promise) ReferenceError: process is not defined" HOT 2
- @:loaded not working with hxnodejs HOT 7
- Won't build: Slot.hx Too many arguments
- @:controlled stoped working in Haxe 4.3
- Safe navigation operator not supported
- Add a compiler define for forcing boolean attributes to be required
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coconut.ui.