Giter VIP home page Giter VIP logo

Comments (3)

fradav avatar fradav commented on June 2, 2024 1

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 :

  1. writing "a DOM expression" engine directly in fable, reimplementing basically what solidjs does but in f#/fable
  2. Offering a simple but efficient Interop for solidjs (or similar UI framework)

Actually,

  1. 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)
  2. 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.

dbrattli avatar dbrattli commented on June 2, 2024

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.

fradav avatar fradav commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.