But auto generated editorProps.code code does not contain the useRef hook.
const ref = React.useRef(null);
I deep dived inside the useView code. Inside getCode -> getAstReactHooks, only React.useState template being used to auto generate useState hook. Do we need useRef template here as well based on if scope contains a ref?
We are facing a issue where our component requires a
ref
to be passed to the component. We are passingref
touseView
via the scope property.But auto generated
editorProps.code
code does not contain the useRef hook.I deep dived inside the useView code. Inside getCode -> getAstReactHooks, only React.useState template being used to auto generate useState hook. Do we need useRef template here as well based on if scope contains a
ref
?