Giter Site home page Giter Site logo

ericluap / brisk-reconciler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from briskml/brisk-reconciler

0.0 0.0 0.0 579 KB

React.js-like reconciler implemented in OCaml/Reason

License: MIT License

OCaml 8.15% C++ 0.44% JavaScript 0.29% Reason 91.13%

brisk-reconciler's Introduction

Build Status

brisk-reconciler

An easy way to model any tree-shaped state with simple stateful functions

Definitions:

  • tree-shaped state: Any tree shaped-state like the DOM tree, app navigation state, or even rich text document!
  • stateful functions: Functions that maintain state over time. Imagine that you can take any variable in your function and manage its value over the function's invocation. Now, imagine that any function invocation really creates its own "instance" of the function which will track this state separately from other invocations of this function.

Why?

We want to provide expressive and powerful abstractions to build and update trees of dynamic data. We built it with UIs in mind but this library is generally applicable.

We encourage you to experiment with this abstraction for different types of outputs. Thanks to OutputTree-agnostic Hooks (the mechanism which makes functions stateful), different types of outputs can use the same internal logic for updates or side effects.

One example of this is Brisk and Revery, where we have two vastly different approaches to building UIs. However, thanks to the shared layer, we envision that it'll be very simple to use the two at the same time.

We are building it in Reason. It's a very fast, scalable, and extremely expressive language with an amazing FFI. It has an incredibly powerful type system. Reason is a bridge between the world of mainstream programming and great ideas born in academia. It is an alternative syntax to OCaml so you can use (or even convert between) the two at the same time.

Projects which use brisk-reconciler

Examples

  • Lambda_term

    • cd examples/lambda-term
    • esy
    • esy run
  • DOM

    • cd examples/dom
    • esy
    • open index.html

Contributing

Install esy

npm install -g esy

Installation using opam

We currently don't have an opam workflow ready. We're open to contributions!

Development workflow

Take a look at our issues if you'd like to get an idea where to start.

  • build: esy
  • test: esy test

Community

Join us on reason native ui discord server here.

License

This project is provided under the MIT License.

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.