You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mediaquery not working in defineVars on real devices #283
Bit of a long shot and not sure how to easily reproduce (let me know if I can use some predefined "snack" or codeSandbox to reproduce, but would be tricky as it needs to be checked specifically on a real device). But basically I encountered this strange behavior:
when a css.defineVars variable is defined using screen size media queries, its value works correctly on emulators, but not on real devices where it is completely ignored (style is not passed at all).
Everything works fine on emulator and on web css output.
Expected behavior
the default value of the token should be used on a real mobile device
Steps to reproduce
RN version 0.78
RSD: 0.0.34
(not using expo, but own App bundled with metro and babel/postss config as per documentation)
Issue seems consistent on both Android and iOS devices
If you can make an Expo snack with the reproduction, that would be helpful. Thanks
Is there a template for expo snack with react-strict-dom ? I've been trying to build one, but it cannot resolve "react-strict-dom" in the package.json (tried versions from 0.0.34 to 0.0.29)
I get an error like:
package.json (3:5)
Failed to resolve dependency 'react-strict-dom@0.0.34' (Can't resolve '' in '/tmp/snackager/snackager/buildStatus/1/react-strict-dom@0.0.34-ios,android,web/package')
I think snack can't resolve RSD since it switched to using Node.js package exports. It works for 0.0.27 but not 0.0.28 upwards (when it switched to exports). I'm guessing any package using exports has the same issue.
Activity
necolas commentedon Mar 25, 2025
If you can make an Expo snack with the reproduction, that would be helpful. Thanks
axyz commentedon Mar 25, 2025
Is there a template for expo snack with react-strict-dom ? I've been trying to build one, but it cannot resolve "react-strict-dom" in the package.json (tried versions from 0.0.34 to 0.0.29)
I get an error like:
necolas commentedon Mar 25, 2025
Maybe a recent bug in snack? Or maybe it can't resolve packages that use Node exports? cc @EvanBacon
necolas commentedon Jun 26, 2025
I think snack can't resolve RSD since it switched to using Node.js package exports. It works for 0.0.27 but not 0.0.28 upwards (when it switched to exports). I'm guessing any package using exports has the same issue.