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
From my understanding of this code, the DevTools parse the version number advertised by the renderer in injectIntoDevTools to select how to parse the internal fiber object. Unfortunately this means that third-party renderers that advertise a version lower than the equivalent React version for the react-reconciler release they are using get misclassified: for instance @react-three/fiber@6.0.13 is using react-reconciler@0.26.2 which is equivalent to react@17.0.2, and since major version 6.y.z is much lower than 17.y.z it uses the default values for the ReactTypeOfWork enum which in turns lead to FunctionComponent getting identified as IndeterminateComponent and hook inspection being unavailable.
A short term solution for renderers is to advertise a React-compatible version number, but ideally this is an implementation detail of the devtools that users of react-reconciler should not have to be aware of (also this means the version number displayed in the devtools is wrong). I'm not sure I'm familiar enough with the internals of the devtools to open a PR for this, but since the version parsing logic is used to detect features that are internal to react-reconciler anyway I guess a solution would be to have the Reconciler package add its own value for the ReactVersion constant along with the parameters sent to the devtools backend, and have the devtools use this string if its available over the renderer version.
The text was updated successfully, but these errors were encountered:
Once #21268 and #21269 land (and get released) newer versions of the reconciler will inject its own version (to be used instead of the renderer version). Unfortunately this won't help you until you upgrade.
This is a followup issue for pmndrs/react-three-fiber#1231
From my understanding of this code, the DevTools parse the version number advertised by the renderer in
injectIntoDevTools
to select how to parse the internal fiber object. Unfortunately this means that third-party renderers that advertise a version lower than the equivalent React version for thereact-reconciler
release they are using get misclassified: for instance@react-three/fiber@6.0.13
is usingreact-reconciler@0.26.2
which is equivalent toreact@17.0.2
, and since major version6.y.z
is much lower than17.y.z
it uses the default values for theReactTypeOfWork
enum which in turns lead toFunctionComponent
getting identified asIndeterminateComponent
and hook inspection being unavailable.A short term solution for renderers is to advertise a React-compatible version number, but ideally this is an implementation detail of the devtools that users of
react-reconciler
should not have to be aware of (also this means the version number displayed in the devtools is wrong). I'm not sure I'm familiar enough with the internals of the devtools to open a PR for this, but since the version parsing logic is used to detect features that are internal toreact-reconciler
anyway I guess a solution would be to have the Reconciler package add its own value for theReactVersion
constant along with the parameters sent to the devtools backend, and have the devtools use this string if its available over the renderer version.The text was updated successfully, but these errors were encountered: