Hyperhooks is a minimalistic stand-alone implementation of React Hooks and the Virtual DOM concept exposed by the React API.
The hyperhooks-core
component provides the foundational h
(for hyperscript) function which is equivalent to React's createElement.
Additionally several hook functions are exposed: useCallback
, useEffect
, useReducer
, useRef
, useState
โฆ
hyperhooks-core
is used by the DOM Renderer to target the Web.
Hyperhooks can also target native iOS (and other Apple Platforms) via the Swift Renderer.
To use hyperhooks-core
just import lib/hyperhooks-core.js
into your module. You will need a renderer to generate views for a specific platform.
Alternatively you can add it to your page via <script>
tag.
<script src="https://github.com/hyperhooks/hyperhooks-core/releases/download/1.0.0/hyperhooks-core.js"></script>
hyperhooks-core
is written in Pure JavaScript with no transpiling needed.
Tests are located in the test folder. To run them, open test/index.html
with your browser of choice and open the development console to see the results.