Open alphonse92 opened 2 years ago
Hey @alphonse92, could you try the following changes locally and see if they fix this issue? https://github.com/Shopify/restyle/pull/152/files
Hey @alphonse92, could you try the following changes locally and see if they fix this issue? https://github.com/Shopify/restyle/pull/152/files
I wasn't able to try your solution, however, I can confirm I had a similar issue as the above poster, and downgrading to 2.0.0 solved it for me. When I upgraded to 2.1.0, the app would immediately crash if any Text components were on screen. The error code I got was:
Error: Value 'defaults' does not exist in theme['textVariants']
I'm having the same issue. running restyle 2.1.0. Going to try to downgrade to 2.0.0
I'm having the same issue. running restyle 2.1.0. Going to try to downgrade to 2.0.0
Can confirm I'm still having the same issue and this suggestion worked then and still works now.
Hey @alphonse92, could you try the following changes locally and see if they fix this issue? https://github.com/Shopify/restyle/pull/152/files
@sbalay Yes it is working, can we have this fix in the release branch?
same here.
This is still broken, and in addition, #35 is now appearing in new apps as well, and both are resolved by downgrading to 2.0.0. It's a 50/50 of which of these issues appear in a new app I'm working on. At this point, I can only assume 2.1.0 is broken and has been for some time. Luckily 2.0.0 is fully stable, as I'm using this in 5 different apps and have been for a few months, so if anyone is using this library, make sure you yarn add @shopify/restyle@2.0.0
Hey @alphonse92 and @alexanderblackh, I'm unable to reproduce locally. Are you still seeing this issue?
I have run into this issue using version 2.4.2
I have run into this issue using version 2.4.2
Same. I get
Error: Value 'defaults' does not exist in theme['textVariants']
regardless I've a defaults or not. Version 2.4.2
Also having that problem in 2.4.2
Hey y'all, sorry for ghosting on this thread, I gave up sometime ago and found downgrading for my prior project provided what I needed. However, on a new project this re-appeared again that used an old theme.ts that outright lacked a defaults
under the textVariants
block. So if y'all see this error again, double-check you have it and it's spelled correctly.
Restyle components do not use the default styles unless you specify it
variant="defaults"
in the props.My component looks like:
The theme object variant looks like:
Video showing the variant only working when I set
variant="defaults"
https://user-images.githubusercontent.com/18203585/167021839-d6354be8-d115-45bd-97b5-bad0ebebf1a1.mov
Version
More info:
I created a wraper component to inspect the style object passed down by the restyle wraper. As you can see the first two outputs are printed when
variant is undefined
but the next two outputs shows are printed whenvariant="defaults"