Skip to content

Commit aac6afe

Browse files
authored
Chores: Update examples, RHL 3 & babel 6 (#59)
* chore(exampels): rm deprecated babel-plugin-react-hot * chore(examples): RHL 3 * chore(examples): update react-transform-catch-errors Babel 6 support * chore: move to babel 6 * chore(examples): add READMEs * chore(test): babel-cli for travis
1 parent 719185d commit aac6afe

File tree

28 files changed

+105
-196
lines changed

28 files changed

+105
-196
lines changed

.babelrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"stage": 0,
3-
"loose": "all",
2+
"presets": ["es2015", "stage-0", "react"],
43
"plugins": [
54
"rewire"
65
]

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ node_js:
99
- iojs
1010
before_install:
1111
- npm i -g npm@^2.0.0
12+
- npm i -g babel-cli
1213
before_script:
1314
- npm prune
1415
after_success:

examples/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Examples
2+
At the time of this writing, we are in a bit of a limbo. `react-hot-loader` [version 3](https://github.com/gaearon/react-hot-loader/pull/240) is about to be released, but (possibly among other things) is waiting on [ErrorBoundaries in react](https://github.com/facebook/react/pull/6020), which is likely to land in the next react release.
3+
4+
Because of this, the examples have been updated to reflect the current state of deprecation and anticipation:
5+
* The [`react-hot-loader` example](react-hot-loader/) features the upcoming version 3 (currently 3.0.0-beta.2), but does not yet support error catching and rendering on updates, only on initial mount. This is the future, but it's not quite here.
6+
* The [`react-transform-catch-errors` example](react-transform-catch-errors/) shows how to catch and render errors with the deprecated `react-transform-catch-errors` plugin. This is the way of the past, but it works today.
7+
8+
## For the futurists
9+
If check out the [PR, which brings ErrorBoundaries to react](https://github.com/facebook/react/pull/6020), and build react from source, you can use the RHL 3 example __with hot reloading error capture__ today.

examples/babel-plugin-react-hot/.babelrc

Lines changed: 0 additions & 10 deletions
This file was deleted.

examples/babel-plugin-react-hot/components/App.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/babel-plugin-react-hot/error-catcher.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/babel-plugin-react-hot/index.html

Lines changed: 0 additions & 15 deletions
This file was deleted.

examples/babel-plugin-react-hot/index.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/babel-plugin-react-hot/package.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

examples/babel-plugin-react-hot/webpack.config.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)