Skip to content

compulim/react-hooks-component-under-babel-standalone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published