nanocomponent-adapters
Adapters to make nanocomponent run natively inside frameworks. This allows you to write highly performant components once, and reuse them between all frameworks.
Table of Contents
Not all languages and frameworks are supported yet; PRs to support more frameworks support are very welcome!
- Custom Elements (webcomponents)
- React
- Preact
- Choo
- Angular
- Ember
- Cycle
- Inferno
- Elm
Custom Elements (webcomponents)
var toCustomElement = var component = var html = // create new nanocomponentvar Button = // register as custom elementButton = document // create new custom-buttonvar button = documentdocumentbody
Preact (to be implemented)
var toPreact = var component = var preact = var html = var render = preactrender // create new nanocomponentvar Button = Button = // render an instance of Button into <body>:;
React
var toReact = var reactDom = // create new nanocomponentvar Button = Button = ReactDOM
Choo
var component = var html = var choo = // create new nanocomponentvar customButton = var app = choodocumentbody { return html` `}