Comments (3)
It's not about tree-shaking. I realize this is more related to how fable optimize immutable structures when transpiling to js objects. solidjs provides an immutable API over js (mutable) objects, directly wiring reactive stuff into the DOM. Doing the same sort of thing for fable should be at lower level than AsynRx.
There is two posibilities :
- writing "a DOM expression" engine directly in fable, reimplementing basically what solidjs does but in f#/fable
- Offering a simple but efficient Interop for solidjs (or similar UI framework)
Actually,
- is very appealing but should be challenging and taken as a long term project (solidjs author, a seasoned js dev, confessed that it took 4 years to mature the "fine-grained reactive" paradigm into actual JS framework, so the difficulty shouldn't be underestimated)
- should be feasible in short time frame if we focus only on the "view engine" and delegate the model handling to elmish/asyncrx like it is done actually. Moreover, solidjs offer almost the same hook API than react, so porting Fable.Reaction should be relatively straightforward. An interesting side project would to provide "switchable view engine" like Seview, in order to have the choice between different view engines like react, preact, mithril, solidjs and so on.
from fable.reaction.
Very interesting. I haven't seen anything like that before. I had some ideas of bringing Reaction to JS by perhaps just using RxJS instead of AsyncRx. I don't think there's much overhead with AsyncRx as WebPack will tree-shake so you only get the functions you actually use.
from fable.reaction.
Syme, D. (2006). Initializing mutually referential abstract objects: The value recursion challenge. Electronic Notes in Theoretical Computer Science, 148(2), 3-25.
In fact it is already deep in the core, but not that much highlighted by f# community. I'm convinced there is raw untapped power to handle precisely this paradigm. The whole "reactive engine" thing is a glorified let rec
😃
from fable.reaction.
Related Issues (20)
- How to have query map a message for the current connection once and send the mapped message all connections HOT 1
- Websocket message channel filtering HOT 1
- Updating to Fable.Core 3.0 and friends HOT 8
- Update Awesome Fable links
- Messages based on Commands are not fed into stream HOT 11
- Need simpler example for Elmish.Streams.AspNetCore.Middleware HOT 4
- Fix Introduction in getting started HOT 1
- How to protect WS middleware with authentication? HOT 1
- Not compatible with netcoreapp3.1/netstandard2.1 target HOT 14
- Feliz update breaks Magic example HOT 9
- Dispose subscription when observable terminates HOT 2
- Support disposing AsyncDisposable multiple times HOT 1
- Fable.Reaction on other elmish platforms HOT 3
- Async to IAsyncObservable? HOT 1
- AutoComplete example doesn't receive Msg.KeyboardEvent HOT 1
- Why Async.Start' ? HOT 3
- Usage with older Fable compiler HOT 4
- Documentation update
- Stream handling function does not obtain the actual state (it is always the initial one instead) HOT 5
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 fable.reaction.