elegant-react
Advanced tools
Comparing version 0.0.7 to 0.1.0
{ | ||
"name": "elegant-react", | ||
"version": "0.0.7", | ||
"version": "0.1.0", | ||
"description": "Elegant Functional Architecture for React", | ||
@@ -5,0 +5,0 @@ "main": "lib", |
# elegant-react | ||
Functional React Architecture based on [omniscient](http://omniscientjs.github.io/) and [browser.html](https://github.com/mozilla/browser.html/). | ||
I've created this repo for use in my own projects. You're welcome to use it as well. | ||
Functional React Architecture based on [omniscient](http://omniscientjs.github.io/) and [browser.html](https://github.com/mozilla/browser.html/). | ||
I've created this repo for use in my own projects. You're welcome to use it as well. | ||
Comments/suggestions/PRs are all welcome. | ||
@@ -14,23 +14,35 @@ If you are interested in something like | ||
## Installation | ||
## Using in your project | ||
Install via npm | ||
npm install elegant-react | ||
## Using in your project (functional style) | ||
Require it: | ||
var component = require('elegant-react').component; | ||
var {component, subedit} = require('elegant-react'); | ||
Or if you'd like to enable debug mode: | ||
var component = require('elegant-react')({debug: true}).component; | ||
var {component, subedit} = require('elegant-react')({debug: true}); | ||
## Using in your project (classical style) | ||
Require it: | ||
var {elegant, subedit} = require('elegant-react/classy'); | ||
Or if you'd like to enable debug mode: | ||
var {elegant, subedit} = require('elegant-react/classy')({debug: true}); | ||
## react-native support | ||
Same as the previous section, except replace `require('elegant-react')` with `require('elegant-react/native')` | ||
Same as the previous two sections, except replace: | ||
- `require('elegant-react')` with `require('elegant-react/native')` | ||
- `require('elegant-react/classy')` with `require('elegant-react/classy/native')` | ||
## Using in codepen, jsbin, etc. | ||
@@ -41,3 +53,3 @@ | ||
//rawgit.com/gilbox/elegant-react/master/build/global/elegant-react.js | ||
This exposes the global object `ElegantReact`. | ||
@@ -48,3 +60,3 @@ | ||
var component = ElegantReact.component; | ||
Or if you'd like to enable `debug` mode: | ||
@@ -68,3 +80,3 @@ | ||
npm run examples | ||
... and navigate to [http://localhost:8080/webpack-dev-server/](http://localhost:8080/webpack-dev-server/) | ||
@@ -80,3 +92,3 @@ | ||
- omniscient is unit-tested | ||
- omniscient is ~18kb minified. elegant-react is <3kb minified. | ||
- omniscient is ~18kb minified. elegant-react is <3kb minified (or ~4kb for classical style). | ||
@@ -83,0 +95,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
14694
11
280
95
0