Scala.js facades for common React.js utilities and components.
It uses excellent scalajs-reactjs binding/facade library.
val scommonsReactVer = "1.0.0-SNAPSHOT"
libraryDependencies ++= Seq(
"org.scommons.react" %%% "scommons-react-core" % scommonsReactVer,
"org.scommons.react" %%% "scommons-react-dom" % scommonsReactVer,
"org.scommons.react" %%% "scommons-react-redux" % scommonsReactVer,
"org.scommons.react" %%% "scommons-react-test" % scommonsReactVer % "test",
"org.scommons.react" %%% "scommons-react-test-dom" % scommonsReactVer % "test"
)
Latest SNAPSHOT
version is published to Sonatype Repo, just make sure you added
the proper dependency resolver to your build.sbt
settings:
resolvers += "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
-
Demo Application
- live demo => How to Build and Run
- AppMain => tests
- AppState => tests
- CounterActions => tests
- CounterController => tests
- CounterPanel => tests
- CounterState => tests
-
Components:
- ClassComponent => tests
- ErrorBoundary => tests
- FunctionComponent => tests
- React.memo => tests
- React.Fragment => tests
-
React API
-
React Hooks:
- useState => tests
- useReducer => tests
- useMemo/useCallback => tests
- useContext => tests
- useRef => tests
- useEffect => tests
- useLayoutEffect => tests
To build and run all the tests use the following command:
sbt test
You can find more documentation here