glamorous-native
glamorous-native copied to clipboard
Use emotion-native to get rid of ListView error
Use https://www.npmjs.com/package/@emotion/native instead.
@maintainers: It seems like this repository is stale. Consider archiving / deprecating and pointing to Emotion just like the Glamerous repository. We thank you for all your effort put into this plugin.
Are you sure about this package? It seems to use ListView as well.
We have succesfully replaced glamerous-native with emotion in 2 simple steps:
- Add @emotion/core and @emotion/native to your repo
- Change your current code like this:
- import glamorous from 'glamorous-native';
+ import styled from '@emotion/native';
- const Container = glamorous.view({
+ const Container = styled.View({
flex:1,
alignItems: 'center',
paddingTop: 20,
});
That's all. There does not seem to be a ListView warning for us anymore.
If you look at this repository, the deprecation warning is clear: https://github.com/paypal/glamorous
-edit- I just noticed how the maintainers mention glamerous-native is not deprecated here: https://github.com/paypal/glamorous/issues/419
however, since this repository seems very stale compared to emotion and the listview error is gone for us, I would still recommend updating to emotion. However, I was wrong about Glamerous-Native being deprecated, this is only Glamerous. Could a maintainer please clarify on the state of this repository?
We have succesfully replaced glamerous-native with emotion in 2 simple steps:
- Add @emotion/core and @emotion/native to your repo
- Change your current code like this:
- import glamorous from 'glamorous-native'; + import styled from '@emotion/native'; - const Container = glamorous.view({ + const Container = styled.View({ flex:1, alignItems: 'center', paddingTop: 20, });That's all. There does not seem to be a ListView warning for us anymore.
If you look at this repository, the deprecation warning is clear: https://github.com/paypal/glamorous
-edit- I just noticed how the maintainers mention glamerous-native is not deprecated here: paypal/glamorous#419
however, since this repository seems very stale compared to emotion and the listview error is gone for us, I would still recommend updating to emotion. However, I was wrong about Glamerous-Native being deprecated, this is only Glamerous. Could a maintainer please clarify on the state of this repository?
I'll give it a try, thanks!
@jdegger It works perfect!!! Thanks for the tip!!!
I used Glamorous-native like that:
import {View} from "glamorous-native"
...
return <View backgroundColor="red">...</View>
Doesn'T seem to work with emotion
This project is now a deprecated status, thank you for referring developers over to emotion/native