Snack: static defaultProps broken?

I can’t seem to get static defaultProps to work in Snack, but the same code works in a regular Expo app. This is just like defaultProps doesn't work? but that one is specific to CRNA so I posted in this forum as well (sorry for the dupe).

Repro Snack (should render test = true, not test = undefined): https://snack.expo.io/ByGHeH0Zz

Thanks!

hi there! yeah this is a bug at the moment. @tc is aware of it and working on a solution! sorry for the hassle

1 Like

Sweet, thanks @notbrent and @tc. And thanks for Expo!

The Expo SDK v25.0.0 blog post mentioned the following under Snack Improvements:

Improvements to error handling & static properties.

But the repro case still fails on v25.0.0, so I’m assuming those improvements did not include a fix, correct?

Static properties are now working in snacks, but defaultProps are not being handled correctly yet :frowning:
https://snack.expo.io/Sk9gbAvSf
defaultProps should be working as well by SDK 26

1 Like

Gotcha. Thanks @thetc.