mirror of https://github.com/status-im/reagent.git
Update 0.8-upgrade.md
This commit is contained in:
parent
cd12a3188c
commit
bd03dedc56
|
@ -3,22 +3,26 @@
|
|||
The necessary changes depend on what environment you target, and
|
||||
how you want to provide React.
|
||||
|
||||
| | Build | Browser | Node |
|
||||
|---|---|---|---|
|
||||
| Cljsjs | `:none` | Supported | Requires Cljs 1.10.145+ |
|
||||
| Cljsjs | `:advanced` | Supported | Requires Cljs 1.10.145+ |
|
||||
| `node modules` | `:none` | Supported | Supported |
|
||||
| `node modules` | `:advanced` | Supported | Partially supported<br> (`ReactDOM/server` currently broken) |
|
||||
|
||||
## Browser - Cljsjs
|
||||
|
||||
Using Reagent itself with Cljsjs packages doesn't require changes,
|
||||
other than making sure you depend on the latest Cljsjs React packages,
|
||||
Using Reagent with Cljsjs packages doesn't require changes,
|
||||
other than making sure you update Cljsjs React dependencies,
|
||||
if you have direct dependencies to them.
|
||||
|
||||
## Browser - node modules
|
||||
|
||||
You can use `:npm-deps` and `:install-deps` compiler options to
|
||||
install the packages automatically.
|
||||
|
||||
If `react`, `react-dom` and `create-react-class` are available in `node_modules`
|
||||
directory, ClojureScript compiler will use these with Reagent. **This
|
||||
doesn't depend on use of `:npm-deps` option!** `:npm-deps` option is only about
|
||||
installing the dependencies, if packages are available in `node_modules`
|
||||
directory, they will be used.
|
||||
directory, ClojureScript compiler will use these with Reagent. To disable this by adding `:npm-deps false` compiler option.
|
||||
|
||||
If you don't want to call `npm` and manage `package.json`, you can use `:npm-deps` and `:install-deps` compiler options to
|
||||
install the packages automatically.
|
||||
|
||||
You can use `:process-shim` compiler option to provide `process.env.NODE_ENV`
|
||||
constant which is used by JS code to enable development and production
|
||||
|
@ -52,6 +56,8 @@ If your bundle provides other libraries, you could extern `:provides` and `:glob
|
|||
|
||||
Requires https://github.com/clojure/clojurescript/commit/f7d611d87f6ea8a605eae7c0339f30b79a840b49
|
||||
|
||||
Available in 1.0.46+
|
||||
|
||||
Reagent should use Cljsjs libraries by default even when running on Node.
|
||||
|
||||
## NodeJS - node modules
|
||||
|
|
Loading…
Reference in New Issue