Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[WIP] Upgraded to Preact 10.3.4 #5639
What type of PR is this? (check all applicable)
Preact has been upgraded to the latest version, Preact X. This gives us hooks, componentDidCatch, fragments etc. See the official release for the whole rundown. Here is the official migration guide for Preact 8.x to X if you're curious why some changes have been made.
I've done a smoke test of the site on my local. Onboarding worked fine, search is good and the site seems to behaving normally.
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Added to documentation?
[optional] What gif best describes this PR or how it makes you feel?
@nickytonline Seems like https://github.com/mzgoddard/preact-render-spy might be abandoned: there's a Preact X fork up at https://github.com/shelacek/preact-render-spy. What do we use
@joshpuetz, I tried the fork of preact-render-spy and it does not work. We use preact-render-spy for snapshot testing. It does appear to be abandoned although Jason Miller talked about fixing it up. See this Tweet thread between Jason and I.
Also, I'm looking to move away from snapshot testing in favour of preact-testing-library. Even enzyme is not considered to be the way to test React components now (so Preact as well). As I mentioned on Slack, react-testing-library is the recommended tool by the React team, so I would be inclined to move towards preact-testing-library.
The way I see it panning out is migrating to another testing tool and once all tests are migrated, we can upgrade.