uiwjs / react-json-view

A React component for displaying and editing javascript arrays and JSON objects.
https://uiwjs.github.io/react-json-view/
MIT License
212 stars 12 forks source link

ref prop is somehow ignored #11

Open nelsieborja opened 1 year ago

nelsieborja commented 1 year ago

The following code gives a null value for ref.current:

const ref = useRef();
useEffect(() => {
  console.log(ref);
}, [ref]);

return (
  <JsonView
    ref={ref}
    ...
  />
)
jaywcjlove commented 1 year ago

@nelsieborja Upgrade v1.8.4