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
Maybe we can just rename it to react-native-renderer to clarify the difference.
Better strategy for shared code?
Currently we just pile code into shared without particular structure, and then import directly through Haste. This is the same as we do in master though, so it’s at least no worse. We might want to tighten that up a little bit in the future, and maybe have some first-class entry points into it. We need to be clear shared code will be duplicated between any renderers using those modules.
Server shouldn't depend on reconciler modules.
I noticed warnValidStyle depends on ReactDebugCurrentFiber. This seems like it will always miss owner in warnings on server. Maybe it should depend on some other shared file instead? Regardless, this is already an issue on master so it’s not a regression.
Find a more solid way to avoid Jest skipping our own modules (current hack is gross).
The hack being "transformIgnorePatterns": ["/node_modules/(?!react)"], in package.json. Otherwise Jest skips our own code thinking it doesn’t need to be compiled because it was resolved through node_modules.
The hack is not dangerous and can’t cause false positives with third-party code because I specifically check the resolved symlink path in the Jest transformer. Still, it means that if we add a package whose name doesn’t start with react, it will not be Babel-ed in tests until we add another exceptional case there.
We can live with this hack for a little bit since we don’t plan to publish packages that don’t start with react in near future. We should file an issue with Jest though and come up with a better solution.
Should Do Soon
Having a package called
react-native
is weird.Maybe we can just rename it to
react-native-renderer
to clarify the difference.Better strategy for shared code?
Currently we just pile code into
shared
without particular structure, and then import directly through Haste. This is the same as we do in master though, so it’s at least no worse. We might want to tighten that up a little bit in the future, and maybe have some first-class entry points into it. We need to be clearshared
code will be duplicated between any renderers using those modules.Server shouldn't depend on reconciler modules.
I noticed
warnValidStyle
depends onReactDebugCurrentFiber
. This seems like it will always missowner
in warnings on server. Maybe it should depend on some other shared file instead? Regardless, this is already an issue on master so it’s not a regression.Find a more solid way to avoid Jest skipping our own modules (current hack is gross).
The hack being
"transformIgnorePatterns": ["/node_modules/(?!react)"],
inpackage.json
. Otherwise Jest skips our own code thinking it doesn’t need to be compiled because it was resolved throughnode_modules
.The hack is not dangerous and can’t cause false positives with third-party code because I specifically check the resolved symlink path in the Jest transformer. Still, it means that if we add a package whose name doesn’t start with
react
, it will not be Babel-ed in tests until we add another exceptional case there.We can live with this hack for a little bit since we don’t plan to publish packages that don’t start with
react
in near future. We should file an issue with Jest though and come up with a better solution.Update: fixed via Update Jest and remove hacks #11372.
Should Do Later
useFiber
flag in bundle configReact
should be React entry point etc)fbEntry
in bundle configlowPriorityWarning
into PROD bundle?react-dom/npm/index.js
being the exception)scripts
into packages too?The text was updated successfully, but these errors were encountered: