We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
when patching a function component inferno dosn't differ between function component with and without forwardrefs, like on mounting.
function mountFunctionalComponent$2(vNode, parentDOM, context, isSVG, nextNode, lifecycle) { ... var ref = vNode.ref; var input = handleComponentInput$2(vNode.flags & 32768 /* ForwardRef */ ? type(props, ref, context) : type(props, context)); ... }
function patchFunctionalComponent(lastVNode, nextVNode, parentDOM, context, isSVG, nextNode, lifecycle) { ... if (shouldUpdate !== false) { if (nextHooksDefined && isFunction(nextRef.onComponentWillUpdate)) { nextRef.onComponentWillUpdate(lastProps, nextProps); } var nextInput = handleComponentInput(nextVNode.type(nextProps, context)); patch(lastInput, nextInput, parentDOM, context, isSVG, nextNode, lifecycle); ... }
So the call to nextVNode.type will be without ref. At the end ref is context, lastVNode.ref !== nextVNode.ref and the ref will be nulled.
... var nextRef = nextVNode.ref; var lastRef = lastVNode.ref; if (lastRef !== nextRef) { unmountRef$2(lastRef); mountRef$2(nextRef, dom, lifecycle); } ...
Thx
The text was updated successfully, but these errors were encountered:
Hi @chrkulbe
Thanks for reporting this issue, I will have a look into it when I have some free time :)
Sorry, something went wrong.
Fixed in master
No branches or pull requests
Hi,
when patching a function component inferno dosn't differ between function component with and without forwardrefs, like on mounting.
So the call to nextVNode.type will be without ref. At the end ref is context, lastVNode.ref !== nextVNode.ref and the ref will be nulled.
Thx
The text was updated successfully, but these errors were encountered: