Comments (9)
Got the same problem with version 1.1.1 after updating to Expo 22.
Did a few hours of research.
It worked with RN 0.46 but doesn't with 0.49
@epeli what was the last RN version that worked for you?
It works when I replace the View
with TouchableOpacity
(but I can't use buttons anymore) or ScrollView
(which messes up the layout)
I saw most of the code hasn't changed since may, so it seems to have something todo with RN. Somehow the View
behaves differently now.
Also, most of the glamorous-native code is the same for all components, so it has to be something that only changed for the View
from glamorous-native.
Great report, and thanks for taking a look @kay-is.
I wonder if onLayout
is getting treated like ref
where it doesn't forward the same way as other props. However, that still wouldn't explain it never becoming called.
I'd like to experiment with onLayout
on a simple higher order component of a View
and see if that becomes called:
function Parent (props) {
return <View {...props} />
}
<Parent style={{width: 50, height: 50}} onLayout={e => console.log('reached', e} />
from glamorous-native.
Didn't mean to close!
from glamorous-native.
Oh, and glamorous.View
doesn't seem to render at all in my app. When I just render <glamorous.View><Text>Hello</Text></glamorous.View>
I get a white screen. When I replace it with <View><Text>Hello</Text></View>
it renders Hello.
from glamorous-native.
I just upgraded to 1.2.0
and now it works again, lol...
from glamorous-native.
Ah!
There was an incompatibility with React 16, which was fixed in #72. Apparently passing children
as properties via React.createElement
stops working in 16. That was released in 1.1.3
.
With that upgrade, @kay-is, does onLayout
now become called?
from glamorous-native.
@epeli what was the last RN version that worked for you?
I have only used glamorous-native with 0.49 and 0.50 and if I recall correctly it was broken on 0.49 too.
from glamorous-native.
@epeli I have encountered a similar bug, after upgrading to Expo SDK 23 (detached, React 1.0.0, RN50) where it seems the pointerEvents view attribute does not work, only on release builds, for both Android and iOS. Using regular RN view solved the problem. #83
from glamorous-native.
Fixed by #85
from glamorous-native.
Related Issues (20)
- Creating styles that can be passed as style prop HOT 1
- Typescript fails to build due to glamorous type errors HOT 3
- Jest/Enzyme with glamorous components: TypeError: this._instance.render is not a function HOT 1
- ThemeProvider breaks build. Listview deprecated error. HOT 2
- Use emotion-native to get rid of ListView error HOT 6
- Support passing in styles as a single css prop HOT 2
- Glamorous component does not render correctly HOT 5
- Add propsAreStyleOverrides to TypeScript definitions HOT 5
- Support propsAreStyleOverrides in the glamorous config
- View pointerEvents not working on release builds only HOT 5
- <TouchableWithoutFeedback> onPress never fired when children is glamorous view HOT 2
- Dynamically determine which react-native elements are supported
- Media queries? HOT 2
- Unexpected token import when testing with Jest + TypeScript HOT 3
- Library bundle
- Use with storybook not working HOT 10
- Forward ref with new React.forwardRef instead of innerRef
- Question: How to correctly type (TS) glamorous(CustomComponent)?
- [question] how does this work? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glamorous-native.