-
Notifications
You must be signed in to change notification settings - Fork 799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Repository Documentation (non-gh-pages) #257
Conversation
}; | ||
if (module.hot) { | ||
module.hot.accept('./containers/rootContainer.js', function() { | ||
var NextRootContainer = require('./containers/rootContainer.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to close the require: require('./containers/rootContainer.js');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the extra pair of eyes! fixed.
Adding clarification to RHL3 docs + JSX highlight in code blocks
I merged in @hedgerh's work from #254 that we can continue here. Some of the previous work was moved to #260, since it was intended for the gh-pages:
|
<AppRoot /> | ||
</AppContainer> | ||
), document.getElementById('react-root')); | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
thanks for the consoleErrorReporter
tip!
I tried to use it as described above and have a few questions/remarks:
- I had to add
redbox-react
to mypackage.json
. If that is desired, I think it would make sense to add it to the docu React.PropTypes.error
raised an error:prop type 'error' is invalid
. I changed it to the proptype definition from Redbox (React.PropTypes.instanceOf(Error).isRequired
) then it works. Not sure if this is a problem with my React version?- Might not be directly related but maybe someone knows: What is the best setting of
devtool
in mywebpack.config.js
file? I tried several ones but the stacktraces dumped both byRedbox
and fromconsole.error
doesn't point to my source files (both link to mybundle.js
that has been generated by webpack, like this:http://localhost:3000/dist/bundle.js:36376:12
). When running my app without hotloader (just removing theAppContainer
wrapper, no changes to.babelrc
orwebpack.config.js
) all errors dumped on Chrome's devtool console are correctly linked to my source files (something likewebpack:///./client/src/components/editor/ContactEditor.js
)
My setup: RHL 3.0.0beta, React 15, npm 2.14.12, babel 6 (with presets es2015, stage-0, react and plugin react-hot-loader/babel), webpack-dev-server 1.14, Chrome 50.0, MacOS
Again: thanks for your efforts!
Nils
thanks @nilshartmann, that's some important feedback and I've updated the doc (yeah, the PropType.error is from react 15, my bad). I'm repasting your 3rd question here so it doesn't get lost, hoping some of the webpack users can help with that (I use Meteor):
|
|
@nilshartmann: Looks the official boilerplate, https://github.com/gaearon/react-hot-boilerplate/blob/next/webpack.config.js |
Hi @hedgerh, thanks for your reply. I've checked the
|
return [rootInstance]; | ||
} | ||
module.hot.accept('./containers/App', () => { | ||
render( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReactDOM.render
probably
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need
const NextApp = require('./containers/App').default
here?
I'm in a twilight zone ... it works without require()
in one project, but it does not work at all in the other, no matter if I use require()
or not.
Can anyone explain when it will work without?
Fixing the broken V3 example in the docs
This shows some common problems with using RHL 3, along with workarounds (since they don't currently have great solutions)
Hey, anyone in this thread want to take a look at #402? |
Also, I think it might be a good idea to merge into |
Also, remove the section about transforming ES2015 classes because we want to fix that soon.
Add "Known Limitations" doc
add JSX syntax highlighting and add another workaround for comparing React element types.
I'm going to merge this because it's confusing that the docs for 3.0 are separate from the code. We probably only need to update |
Hi all, this PR will track all current works on the docs. Additional PRs are welcome against the
next-docs
branch, which will be squashed before the final merge. Please mention this issue in your PR (#257) so everyone involved in docs will be notified.You can read the ongoing draft edition at https://github.com/gaearon/react-hot-loader/tree/next-docs/docs.
See also #260 for the gh-pages docs that live at http://gaearon.github.io/react-hot-loader/.