Giter Site home page Giter Site logo

michael-schwarz / goblint-webfrontend-jsoo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tau-gamma/jsoo-react

0.0 1.0 0.0 9.19 MB

Frontend for goblint written with jsoo-react

License: MIT License

OCaml 34.36% JavaScript 0.39% HTML 2.27% Standard ML 0.06% C++ 0.47% CSS 5.89% Reason 14.66% C 41.68% Makefile 0.22%

goblint-webfrontend-jsoo's Introduction

Webfrontend for Goblint

Developed by Alex Micheli for his Bachelor's thesis at TUM i2.

Based on jsoo-react.


jsoo-react

Bindings to ReactJS for js_of_ocaml, including JSX ppx.

Adapted from ReasonReact.

A word of caution

๐Ÿšง ๐Ÿšง ๐Ÿšง ๐Ÿšง

Very experimental / early stage. Not ready for consumption yet.

Only bindings to the most basic rendering functions and useState / useReducer exist. The rest of the bindings are to be implemented yet.

Ideas / decisions

  • Abstract over Js_of_ocaml "native" types (js_string , js_array) as much as possible behind the bindings. To do so, the library uses gen_js_api to convert from/to these types to their more idiomatic OCaml representation.
  • Keep the API as close as possible to ReasonReact. This is useful for many reasons:
    • Battle tested.
    • Reduce cognitive load by leveraging ReasonReact knowledge.
    • Maximize potential reuse of existing components and libraries.

Bindings

See interop.md.

Running the example

git clone https://github.com/jchavarri/jsoo-react/
cd ./jsoo-react
make init
eval $(opam env)
make dev
# in another tab / terminal session 
cd ./jsoo-react/example
yarn && yarn server

After that, open up localhost:8000. Then modify App.re file in src and refresh the page to see the changes. The example will not work without server as it relies on history / client-side routing using jsoo-react router to navigate through the pages.

Ppx

  • make test to run the test against the expected result.
  • make test-promote when you want to update the expected results.

Acknowledgements

Thanks to the authors and maintainers of ReasonReact, in particular @rickyvetter for his work on the v3 of the JSX ppx. Thanks to the authors and maintainers of Js_of_ocaml, in particular @hhugo who has been answering many many questions in GitHub threads. And thanks to the team behind React.js! What an amazing library :)

goblint-webfrontend-jsoo's People

Contributors

dependabot[bot] avatar idkjs avatar jchavarri avatar michael-schwarz avatar naartjie avatar schinns avatar waschbecken avatar zindel avatar

Watchers

 avatar

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.