All hooks are implemented, few are tested well, if at all.
Features are being added and tested as I need them for work.
Hooks believed to work correctly:
*`useState`
*`useEffect`
*`useLayoutEffect`
*`useRef`
## Rationale
...
...
@@ -28,37 +35,80 @@ Hooks are IMHO a breakthrough feature. They're simple to reason about
and they're low on boilerplate. They make React programming much more
fun and productive and I never want to touch a class component again.
## Concepts
Reactix is a Hooks-first (Hooks-only?) React library focusing on
simplicity and ease-of-use.
### Pure components
<!-- ## Tutorial -->
<!-- There is a tutorial in `docs/tutorial.md` or [online](https://github.com/irresponsible/purescript-reactix/blob/master/docs/tutorial.md) -->
<!-- ## Usage -->
### Hooks components
## Interop
## Limitations
If you wish to use this library with other react libraries, you will
need to write a little glue. The minimum you can sanely get away with
is a typed wrapper over `unsafeCoerce` between `Element` and whatever your
other library's element type is.
## Alternatives
This library uses React directly and knows nothing of any other
purescript React libraries. If you already use a react library, you
should consider one of these libraries instead:
-[purescript-reactix-react](https://github.com/irresponsible/purescript-reactix-react)(a fork of this library to support purescript-react)
-[purescript-react-basic-hooks](https://github.com/spicydonuts/purescript-react-basic-hooks)(a similar library implemented on top of purescript-react-basic)
# Gluing
If you wish to use this library directly anyway, you will need to
write a little glue.
# Usage
# TODO
More, better tests.
If you already use `purescript-react-basic`, you may prefer