glamorous-native icon indicating copy to clipboard operation
glamorous-native copied to clipboard

Use emotion-native to get rid of ListView error

Open jdegger opened this issue 6 years ago • 5 comments

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.

jdegger avatar Jul 22 '19 12:07 jdegger

Are you sure about this package? It seems to use ListView as well.

pamelaschuldiner avatar Jul 30 '19 23:07 pamelaschuldiner

We have succesfully replaced glamerous-native with emotion in 2 simple steps:

  1. Add @emotion/core and @emotion/native to your repo
  2. 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?

jdegger avatar Jul 31 '19 05:07 jdegger

We have succesfully replaced glamerous-native with emotion in 2 simple steps:

  1. Add @emotion/core and @emotion/native to your repo
  2. 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!

pamelaschuldiner avatar Jul 31 '19 15:07 pamelaschuldiner

@jdegger It works perfect!!! Thanks for the tip!!!

pamelaschuldiner avatar Aug 01 '19 19:08 pamelaschuldiner

I used Glamorous-native like that:

import {View} from "glamorous-native"
...
return <View backgroundColor="red">...</View>

Doesn'T seem to work with emotion

kay-is avatar Sep 05 '19 14:09 kay-is

This project is now a deprecated status, thank you for referring developers over to emotion/native

atticoos avatar Aug 27 '22 21:08 atticoos