Package Exports
- @rbxts-js/shared
- @rbxts-js/shared/src/init.lua
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rbxts-js/shared) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
shared
A Roblox Lua port of the shared pseudo-package from React, which contains a number of common utilities and definitions used across the React monorepo.
Status: ✔️ Ported
Source: https://github.com/facebook/react/tree/master/packages/shared
✏️ Notes
ReactTypes.jscontains a number of complex flow-type definitions that are not yet possible with Luau, so it's been simplified to a stub calledReactTypes.roblox.luaReactComponentStackFrame.jsis replaced by a partially-ported stub (ReactComponentStackFrame.roblox.lua) since it contains logic for parsing/navigating JS-specific stack structure. This needs to be ported to the equivalent functionality in Luau.- Some slight changes to
isValidElement.luathat account for the divergent shape of Component and PureComponent objects in our port (forreact, they're functions; for us, they're tables)
❌ Excluded
Forked Config
forks/ReactFeatureFlags.native-fb.js
forks/ReactFeatureFlags.native-oss.js
forks/ReactFeatureFlags.readonly.js
forks/ReactFeatureFlags.test-renderer.js
forks/ReactFeatureFlags.test-renderer.native.js
forks/ReactFeatureFlags.test-renderer.www.js
forks/ReactFeatureFlags.testing.js
forks/ReactFeatureFlags.testing.www.js
forks/ReactFeatureFlags.www-dynamic.js
forks/ReactFeatureFlags.www.js
forks/Scheduler.umd.js
forks/SchedulerTracing.umd.js
forks/consoleWithStackDev.www.js
forks/invokeGuardedCallbackImpl.www.js
forks/object-assign.inline-umd.js
forks/object-assign.umd.jsForks that specify different flag states are used in React with the help of a bundler that swaps in the correct file for the given environment. We don't have this kind of functionality yet, nor the same set of environments.
Integration Tests
__tests__/describeComponentFrame-test.js
__tests__/ReactError-test.internal.jsThese tests required use of React and ReactDOM, and are not viable to port until we have more of the reconciler ported.