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
Different appearances of components when using react-hot-loader #2630
Comments
Any update on this? I have similar issue with |
We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. Thanks for your contributions. |
@joshblack, Is this really "won't fix"? Hot loading is very important for development use. |
@wdiu That 'Wont fix' label was applied by our stale bot. Sorry! That said -- would it be possible to provide us with some sort of testable example of what you're talking about here so we can triage and look into a solution? |
The easiest way to reproduce this is to enable hot loading in your development webpack.js. In the entry array, add
In the plugins array, add A more complete webpack.js might look like
|
@joshblack @emyarod any insight into this? I'll try and recreate the error if I can |
Some sources say that |
Hi there! 👋 If you're wondering why this issue was moved, we're currently updating our repo structure so that every package is found in the same project. This should not have any impact for you, but we wanted to give you a heads up in case you were wondering what is going on. If you have any questions, feel free to reach out to us on Slack or contact us at: carbon@us.ibm.com. Thanks! |
This change fixes the issue that comes with unmatched component class ref vs. its RHL-proxied version. The issue was observed with running `<ComposedModal>` in Carbon website's component live demo pane, opening the modal and hitting the close button. Applied a similar fix to `<DatePicker>`. Fixes carbon-design-system#2630.
This change fixes the issue that comes with unmatched component class ref vs. its RHL-proxied version. The issue was observed with running `<ComposedModal>` in Carbon website's component live demo pane, opening the modal and hitting the close button. Applied a similar fix to `<DatePicker>`. Fixes carbon-design-system#2630.
This change fixes the issue that comes with unmatched component class ref vs. its RHL-proxied version. The issue was observed with running `<ComposedModal>` in Carbon website's component live demo pane, opening the modal and hitting the close button. Applied a similar fix to `<DatePicker>`. Fixes #2630.
As stated in
https://github.com/carbon-design-system/carbon-components-react/blob/master/README.md:
"1.These components require the use of Webpack in your project"
Typically, development webpack configurations use react-hot-loader while production webpack configurations don't.
But carbon-components-react does not work with react-hot-loader, resulting in totally different appearances / behavior in development and production.
For example, in TableBody.js:
if (child.type === TableRow)
This will work fine in production where there is no hotloading, but not in development when there is hotloading.
The reason: gaearon/react-hot-loader#304
The fix is explained in the section on Checking Element types at https://github.com/gaearon/react-hot-loader/blob/master/README.md
This issue is similar to https://github.com/carbon-design-system/carbon-components-react/issues/857 but the difference is that it is not just the childrenOf and childrenOfType that are failing; components appear totally different.
The text was updated successfully, but these errors were encountered: