Git Product home page Git Product logo

Comments (9)

kay-is avatar kay-is commented on June 14, 2024

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.

atticoos avatar atticoos commented on June 14, 2024

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.

atticoos avatar atticoos commented on June 14, 2024

Didn't mean to close!

from glamorous-native.

kay-is avatar kay-is commented on June 14, 2024

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.

kay-is avatar kay-is commented on June 14, 2024

I just upgraded to 1.2.0 and now it works again, lol...

from glamorous-native.

atticoos avatar atticoos commented on June 14, 2024

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.

esamattis avatar esamattis commented on June 14, 2024

@kay-is

@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.

slorber avatar slorber commented on June 14, 2024

@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.

atticoos avatar atticoos commented on June 14, 2024

Fixed by #85

from glamorous-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.