Here are the list of features from React that may not be possible to be converted into SolidJS code and their possible workarounds
react
cloneElement - Probably Element.cloneNode, but this highly depends on the usage and only works for DOM nodes not components.
createFactory
isValidElement - the lack of VDOM makes this impossible, however, instanceof Element can be a valid workaround in some cases.
createRef - we can probably create a library shim such that this one exists and still returns the object, but we can convert those ref property usages into a callback assignment e.g. (el) => ref.current = el.
forwardRef - Can be removed or provide a library shim, which ever works.
memo - There's already a memo function in SolidJS but it behaves differently. We can remove this during compilation since it is totally unnecessary.
useReducer - provide a library shim
useRef - we can remove this and change VariableDeclaration, but that also requires current property accesses.
useLayoutEffect - I'm not sure if createRenderEffect can replace this.
useImperativeHandle - library shim
useCallback - can be removed
useDebugValue - statement can be removed.
useDeferredValue - Now this one is highly different from createDeferred. We'll probably need Ryan's consultation.
- Mutable Sources - library shim
useInsertionEffect - I'm not sure what this is, but I believe it is discussed in the <style> guide for React in the working group
useSyncExternalStore - library shim
Fragment - library shim, but I think I've suggested Ryan to add this one into the SolidJS core.
react-dom
findDOMNode
unmountComponentAtNode - This one's impossible.
flushSync - not sure what this is for, probably for flushing updates.
unstable_renderSubtreeIntoContainer - I think this one was used in React Server Components, but given we don't have VDOM, this one's impossible.
unstable_scheduleHydration
unstable_flushControlled
Here are the list of features from React that may not be possible to be converted into SolidJS code and their possible workarounds
reactcloneElement- ProbablyElement.cloneNode, but this highly depends on the usage and only works for DOM nodes not components.createFactoryisValidElement- the lack of VDOM makes this impossible, however,instanceof Elementcan be a valid workaround in some cases.createRef- we can probably create a library shim such that this one exists and still returns the object, but we can convert those ref property usages into a callback assignment e.g.(el) => ref.current = el.forwardRef- Can be removed or provide a library shim, which ever works.memo- There's already amemofunction in SolidJS but it behaves differently. We can remove this during compilation since it is totally unnecessary.useReducer- provide a library shimuseRef- we can remove this and change VariableDeclaration, but that also requirescurrentproperty accesses.useLayoutEffect- I'm not sure ifcreateRenderEffectcan replace this.useImperativeHandle- library shimuseCallback- can be removeduseDebugValue- statement can be removed.useDeferredValue- Now this one is highly different fromcreateDeferred. We'll probably need Ryan's consultation.useInsertionEffect- I'm not sure what this is, but I believe it is discussed in the<style>guide for React in the working groupuseSyncExternalStore- library shimFragment- library shim, but I think I've suggested Ryan to add this one into the SolidJS core.react-domfindDOMNodeunmountComponentAtNode- This one's impossible.flushSync- not sure what this is for, probably for flushing updates.unstable_renderSubtreeIntoContainer- I think this one was used in React Server Components, but given we don't have VDOM, this one's impossible.unstable_scheduleHydrationunstable_flushControlled