Workiva / react-dart

Dart Bindings for React JS
BSD 2-Clause "Simplified" License
412 stars 67 forks source link

useImperativeHandle should not throw if ref is null #276

Closed aaronlademann-wf closed 4 years ago

aaronlademann-wf commented 4 years ago

I came across this RTE recently that occurs during mount as a result of us accessing jsRef on the Ref when passing through to the React.useImperativeHandle JS interop layer.

Instead of throwing, these changes make it so that the creation of the imperative handle is simply a no-op unless the Ref provided is not null.