like create some expensive object at initial render, because the arguements needs to be decided from the url or props:
`
const ref = useRef();
if (!ref.current) {
ref.current = new SomeExpensiveInitialClass(props.xxx);
}
`
i want to pass the ref down deeply to child component
Top comments (0)