-
-
Notifications
You must be signed in to change notification settings - Fork 107
Revert react integration to tracking current dispatcher #335
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
Conversation
🦋 Changeset detectedLatest commit: 465cc0c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for preact-signals-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
96f680e
to
8415b8a
Compare
Size Change: +121 B (0%) Total Size: 68.5 kB
ℹ️ View Unchanged
|
…null as a signal for entering and exiting a component render
…ly and valid dispatchers
8415b8a
to
b158661
Compare
|
||
import { signal } from "@preact/signals-react"; | ||
import { createElement } from "react"; | ||
import { Route, Routes, MemoryRouter } from "react-router-dom"; |
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.
I was lazy and just pulled in react-router-dom to write the test for the current issue. I could instead write a minimal reproduction if people would like lol
@@ -0,0 +1,5 @@ | |||
--- | |||
"@preact/signals-react": minor |
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.
Making this a minor bump since it is a non-trivial but also non-breaking change to the react package
This is really good job |
… implementation for those versions of React
…ly provide a better devtools experience when the hooks show up in React DevTools
When it will be merged? |
Hoping it fixes some of my issues as well. |
Gonna go ahead and merge this now. Happy to address any feedback afterwards though. Just @-mention in any comments :) |
@andrewiggins Thanks a lot for fixing that issue :D |
Revert our react integration back to setting up signal subscription tracking by watching changes in the ReactCurrentDispatcher instead of proxying function Component calls in createElement so it works with more ecosystem libraries such as react-router-dom.
Check the comment in the source for a deeper discussion of the implementation details and choices.
Fixes #251
Fixes #330