Skip to content
This repository has been archived by the owner on Aug 28, 2022. It is now read-only.

Use emotion-native to get rid of ListView error #111

Closed
jdegger opened this issue Jul 22, 2019 · 6 comments
Closed

Use emotion-native to get rid of ListView error #111

jdegger opened this issue Jul 22, 2019 · 6 comments

Comments

@jdegger
Copy link

jdegger commented Jul 22, 2019

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.

@pamelaschuldiner
Copy link

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

@jdegger
Copy link
Author

jdegger commented Jul 31, 2019

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?

@jdegger jdegger changed the title [NOTE] Glamerous is deprecated and Emotion should be used instead Use emotion-native to get rid of ListView error Jul 31, 2019
@pamelaschuldiner
Copy link

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
Copy link

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

@kay-is
Copy link

kay-is commented Sep 5, 2019

I used Glamorous-native like that:

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

Doesn'T seem to work with emotion

@atticoos
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants