-
Notifications
You must be signed in to change notification settings - Fork 16
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
Master #7
base: master
Are you sure you want to change the base?
Master #7
Conversation
@rsaccon Awesome! You didn't happen to check if the Drawer and Popup examples broke, did you? I actually accidentally updated to |
@developit OMG, you are right, Drawer, Dialog and Snackbar are broken now. So I guess you better not merge this. |
I haven't, but I really (really!) want to see it. It seems to be a lot more polished than toolbox. Thinking about setting up a repo? 💯 |
I just played around a little bit with the webpack example of material-ui and preact, and there seem to be some issues, e.g. with the React Events and other special React stuff, not covered by preact-compat:
|
Dang. I don't even recognize those modules, kinda seems like it's reaching deep into React. That's a bit disappointing :( |
A bunch of these are fixed now as of Preact 5 :) |
@developit Does the fix include |
This bug seems to be caused by React hot loader : gaearon/react-hot-loader#53 |
Correct, that is generally the cause. |
Do you have any workaround? It seems adopting webpack2 (beta) and switching to react-hot-loader is one way... I haven't tried it yet, but this repo can serve as an example: https://github.com/ctrlplusb/preact-compat-hmr |
@louisremi I just use the Webpack HMR API directly: |
Alright, thanks! Btw, I don't think your requestAnimationFrame throttles calls to init unless you return as soon as you detect that a frame has already been requested, e.g.: var isFrameRequested = false;
module.hot.accept('./components/app', () => {
if ( isFrameRequested ) {
return;
}
isFrameRequested = requestAnimationFrame( () => {
init();
isFrameRequested = false;
}
})); |
@louisremi ah, that |
menu now works, with react toolbox 0.14.2