Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/compulim/react-hooks-component-under-babel-standalone

React Hooks component library running under Babel Standalone
https://github.com/compulim/react-hooks-component-under-babel-standalone

babel babel-standalone pure-javascript react react-hooks react-ui-components ui

Last synced: 13 days ago
JSON representation

React Hooks component library running under Babel Standalone

Awesome Lists containing this project

README

        

# React Hooks component under Babel Standalone and pure JavaScript

This is a sandbox for trying out a minimal setup for the following:

- Build a UI library that use React Hooks
- React Hooks requires a singleton of React in memory
- Consume the library in a few ways:
- Full Babel: Consume UI library as NPM package
- Babel Standalone: Consume UI library as CDN bundle, with JSX
- Pure JavaScript: Consume UI library as CDN bundle, without JSX
- Developers can load a version of React/ReactDOM they want to use to `window.React` and `window.ReactDOM`, the UI library must obey
- UI library include a version of React, which it will fallback to

We are not testing Full Babel in this repository because it is relatively easy to done.

We are testing the following matrix:
- Initialize UI by JSX via Babel Standalone
- With React loaded
- Without loading React
- Initialize UI by pure JavaScript, no JSX
- With React loaded
- Without loading React