Closed santitopo closed 2 weeks ago
@wcandillon any ideas on what may be going on?
Yes, thank you for sending me the example project. I will update WithSkiaWeb so any updates/rerendering of the component doesn't trigger any side effects. You can update your code to do the same in the meantime.
:tada: This issue has been resolved in version 1.5.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
@santitopo You can also implement your own component with suspense and implement your own logic there if needed (but I don't think you should or need) but I was just thinking about this.
Description
I've been trying to use
react-native-skia
in my RN web project WITHOUT the deferred registration approach (We can't afford to increase the app loading time because our users often use the app in low-connectivity areas), and I'm seeing the following issue when a prop passed to a component usingWithSkiaWeb
viacomponentProps
gets updated:Cannot read properties of null (reading 'rangeMin')
.The issue doesn't happen if skia is loaded up front with the deferred load approach (
LoadSkiaWeb
), so I guess it must be related to some internal logic of theWithSkiaWeb
util.It's worth mentioning that the feature to pass props down to the wrapped component through
WithSkiaWeb
was merged not long ago here.Version
1.5.0
Steps to reproduce
Created a simple repo where the issue can be reproduced. Follow instructions in the README to reproduce the crash.
Don't defer app registration, and load the component using skia via
WithSkiaWeb
, with changing props passed down to it viacomponentProps
Snack, code example, screenshot, or link to a repository
https://github.com/santitopo/withskiaweb-issue/tree/main