You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.
Hello. I've been trying to replace React / React-DOM with preact / preact-compat on an existing project of mine. This project uses react-mdl fpr the UI. Everything works fine, however, there's an issue with the drawer button.
The button is added after the page is rendered by material-design-lite's own JS. Because of that, if there's a state change that triggers a re-render for the parent of that element, preact removes it. This does not happen with React, however.
I believe this is kind of like #39 and #405 from preact.
I made a small demo reproducing the bug. You can get it here. Just npm install and npm start (uses webpack-dev-server).
PS: I realize this can be worked around by isolating the component and making sure it never re-renders, but I'm reporting since I believe this could improve preact-compat compatibility with other React projects.
Thanks for the great work!
The text was updated successfully, but these errors were encountered:
This is because mdl moves the element outside of Preact's knowledge. Super happy to discuss the issue, but at present I don't really have a workaround.
Since I'm not familiar with the inner workings, I'd welcome a more detailed explanation of what's happening if you're willing to shed some light on the issue. But, if you think it's a bit out of reach to fix right now, I'll work around it or slowly migrate to preact-mdl.
Hello. I've been trying to replace React / React-DOM with preact / preact-compat on an existing project of mine. This project uses react-mdl fpr the UI. Everything works fine, however, there's an issue with the drawer button.
The button is added after the page is rendered by material-design-lite's own JS. Because of that, if there's a state change that triggers a re-render for the parent of that element, preact removes it. This does not happen with React, however.
I believe this is kind of like #39 and #405 from preact.
I made a small demo reproducing the bug. You can get it here. Just
npm install
andnpm start
(uses webpack-dev-server).PS: I realize this can be worked around by isolating the component and making sure it never re-renders, but I'm reporting since I believe this could improve preact-compat compatibility with other React projects.
Thanks for the great work!
The text was updated successfully, but these errors were encountered: