All Projects → reasonml-community → bs-immutablejs

reasonml-community / bs-immutablejs

Licence: other
Reason + BuckleScript bindings to Immutable.js

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to bs-immutablejs

reason-react-lazy-loading
Example project to show how to use components lazy loading in ReasonReact
Stars: ✭ 41 (+46.43%)
Mutual labels:  reasonml
dobux
🍃 Lightweight responsive state management solution.
Stars: ✭ 75 (+167.86%)
Mutual labels:  immutable
JsonCodec
JSON combinator library for BuckleScript/Reason
Stars: ✭ 38 (+35.71%)
Mutual labels:  reasonml
remachine
[WIP] Reason pattern matching viz
Stars: ✭ 44 (+57.14%)
Mutual labels:  reasonml
blockchain-pen
BlockchainPen - a web app for writing immutable messages to the blockchain.
Stars: ✭ 14 (-50%)
Mutual labels:  immutable
reasonml-tic-tac-toe
www.imandra.ai
Stars: ✭ 19 (-32.14%)
Mutual labels:  reasonml
reason-rust-scraper
🦀 Scraping & crawling websites using Rust, and ReasonML
Stars: ✭ 21 (-25%)
Mutual labels:  reasonml
reform
📋 Reasonably making forms sound good
Stars: ✭ 345 (+1132.14%)
Mutual labels:  reasonml
ogaml
Ocaml multimedia library
Stars: ✭ 28 (+0%)
Mutual labels:  reasonml
shoki
Purely functional data structures in Java
Stars: ✭ 30 (+7.14%)
Mutual labels:  immutable
rx-reason
Reactive programming library for ReasonML/OCaml
Stars: ✭ 49 (+75%)
Mutual labels:  reasonml
Mappable
flexible JSON to Model converter, specially optimized for immutable properties
Stars: ✭ 27 (-3.57%)
Mutual labels:  immutable
LifeTime
LifeTime app
Stars: ✭ 35 (+25%)
Mutual labels:  reasonml
bs-dynamic-import
📦🚀 BuckleScript dynamic import interop on JavaScript environment
Stars: ✭ 31 (+10.71%)
Mutual labels:  reasonml
next-react-boilerplate
🔥 NextJS with additional tech feature like react-boilerplate. Demo >>
Stars: ✭ 20 (-28.57%)
Mutual labels:  immutable
react-rules-of-hooks-ppx
This ppx validates the rules of React hooks.
Stars: ✭ 40 (+42.86%)
Mutual labels:  reasonml
sonos-wejay
Slack integration for a local Sonos system
Stars: ✭ 19 (-32.14%)
Mutual labels:  reasonml
reason-vue
ReasonML and Vue
Stars: ✭ 55 (+96.43%)
Mutual labels:  reasonml
peds
Type safe persistent/immutable data structures for Go
Stars: ✭ 57 (+103.57%)
Mutual labels:  immutable
obb-rules
Orion's Belt BattleGrounds battle engine
Stars: ✭ 13 (-53.57%)
Mutual labels:  immutable

bs-immutablejs

Note: these are bindings to the Immutable.js library. These are only meant to be used to interoperate with existing JavaScript code; In Reason/BS, we have more lightweight immutable (and optionally mutable) data structures by default (list, record, hashmap, set, and upcoming data structures). New Reason/BS projects projects don't need bs-immutablejs.

Documentation

The source is a single file of BuckleScript externals. The API corresponds to Immutable.js' API.

Example usage:

let greeting = ImmutableJsRe.List.fromArray([|"hello", "world"|]);

let extendedGreeting = ImmutableJsRe.List.push(greeting, "how are you");

let reallyExtendedGreeting =
  ImmutableJsRe.List.(
    extendedGreeting
    |. push("I'm fine")
    |. push("thank you")
    |. push("and you?")
  );

Generated code:

var greeting = Immutable.List(/* array */[
      "hello",
      "world"
    ]);
var extendedGreeting = greeting.push("how are you");
extendedGreeting.push("I'm fine").push("thank you").push("and you?");

Transitioning to Idiomatic Reason/BuckleScript Data Structures

Here's a table of Immutable.js data structures and their Reason/BuckleScript equivalents. Reason/BS provide the data structures out of the box.

Immutable.js Reason/BuckleScript
List List
Map Map
OrderedMap Belt Map
Set Set
OrderedSet Belt Set
Stack List
Record Record
Seq Use lazy

Contributing

Prerequisite: https://github.com/reasonml/reason-cli.

git clone https://github.com/BuckleTypes/bs-immutablejs.git
cd bs-immutablejs
npm install
npm start
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].