Code Monkey home page Code Monkey logo

slinky's Introduction

Write Scala.js React apps just like you would in ES6

Get started at slinky.dev

What is Slinky?

Slinky is a framework for writing React apps in Scala with an experience just like using ES6.

Slinky lets you:

  • Write React components in Scala with an API that mirrors vanilla React
  • Implement interfaces to other React libraries with automatic conversions between Scala and JS types
  • Write apps for React Native, React 360, and Electron, including the ability to share code with web apps
  • Develop apps iteratively with included hot-reloading support

Contributing

Slinky is split up into several submodules:

  • core contains the React.js facades and APIs for creating components and interfaces to external components
  • web contains bindings to React DOM and definitions for the HTML/SVG tag API
  • reactrouter contains bindings to React Router
  • history contains a facade for the HTML5 history API
  • native contains bindings to React Native and external component definitions for native UI elements
  • vr contains bindings to React 360 and external component definitions for VR UI elements
  • readWrite contains the Reader and Writer typeclasses used to persist state for hot reloading
  • hot contains the entrypoint for enabling hot-reloading
  • scalajsReactInterop implements automatic conversions between Slinky and Scala.js React types
  • testRenderer contains bindings to react-test-renderer for unit testing components
  • coreIntellijSupport contains IntelliJ-specific support for the @react macro annotation
  • tests contains the unit tests for the above modules (except native and vr which have local tests)
  • docs and docsMacros contains the documentation site, which is a Slinky app itself

To run the main unit tests, first install the dependencies by running npm install inside the tests folder, then from the base folder run sbt tests/test. Similarly for React Native tests, run npm install inside the native folder, then from the base folder run sbt native/test.

Note to IntelliJ IDEA users. When you try to import Slinky SBT definition in IDEA and encounter an exception like java.nio.file.NoSuchFileException: /Users/someuser/.slinkyPluginIC/sdk/192.6817.14/plugins, you should try to download required IntelliJ files for plugin subproject manually before importing:

sbt coreIntellijSupport/updateIntellij

And then import the project again.

slinky's People

Contributors

shadaj avatar scala-steward avatar ramnivas avatar joan38 avatar mcallisto avatar zakpatterson avatar nadenf avatar kladdad avatar alexitc avatar dispalt avatar nartamonov avatar oleg-py avatar pme123 avatar asamsig avatar zoosky avatar armanbilge avatar ngbinh avatar virusdave avatar jedahu avatar povder avatar mattkohl avatar sideeffffect avatar seamusv avatar taqas avatar atry avatar gehnaphore avatar mn98 avatar perebarcelo avatar

Watchers

James Cloos avatar  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.