react
react copied to clipboard
Update the list of built-in hooks in react-refresh
Summary
I've noticed that list of built-in hooks inside react-refresh
is a bit outdated. This makes react-refresh
handle them as if they were custom hooks, like in the example of generated code below:
var _s2 = $RefreshSig$();
// ...
_s2(App, "bfyXHsONnHV5LIn00sGBmBnlbi4=", false, function() {
return [useTransition, useId, useCustomHook];
});
This PR updates the list with hooks from both the stable and canary release.
How did you test this change?
I've updated react-refresh
in a Vite project and I've confirmed that these hooks no longer were treated as custom hooks.