In React you can assign name to a component wrapped with forwardRef. This enables correct component names in stack traces.
However, in Preact you can't do this because name property of such component is read-only. So you get an error: Cannot assign to read only property 'name' of function.
Example: https://github.com/mlshv/preact-forwardref-name. You can switch react/preact in config-overrides.js
Use displayName instead of name. The latter is read-only for standard JavaScript functions per spec.
Ah yep, I wouldn't count on this ever being supported. Even if it works in this one case in React, it'll break in many others (depending on the browser).
Most helpful comment
Use
displayNameinstead ofname. The latter is read-only for standard JavaScript functions per spec.