https://linen.dev logo
Join Discord
Powered by
# react
  • c

    cool-psychiatrist-49311

    02/27/2020, 9:41 AM
    not sure 😓
  • u

    user

    02/27/2020, 9:41 AM
    (
    static var Tab:TabProps->ReactFragment
    should do the trick anyway)
  • a

    ambitious-knife-25690

    02/27/2020, 1:45 PM
    Was just trying to stay true to the original api if possible
  • a

    ambitious-knife-25690

    02/27/2020, 1:45 PM
    So calling it like
    <Stack.Tab prop_a={} prop_b={} />
  • u

    user

    02/27/2020, 1:57 PM
    I don't think that's a supported syntax
  • u

    user

    02/27/2020, 1:58 PM
    Wait, it is x)
  • u

    user

    02/27/2020, 1:58 PM
    So what's your issue?
  • a

    ambitious-knife-25690

    02/27/2020, 2:09 PM
    It used to be, but I kept getting errors when attempting it
  • a

    ambitious-knife-25690

    02/27/2020, 2:09 PM
    I guess I was doing something wrong
  • u

    user

    02/27/2020, 2:13 PM
    What errors?
  • a

    ambitious-knife-25690

    02/27/2020, 2:14 PM
    .
  • u

    user

    02/27/2020, 2:16 PM
    Only diagnostics or real compilation fails too?
  • a

    ambitious-knife-25690

    02/27/2020, 2:16 PM
    I made
    Screen
    Dynamic
  • u

    user

    02/27/2020, 2:16 PM
    Err I don't think that can work
  • u

    user

    02/27/2020, 2:16 PM
    Create a Screen class (extends ReactComponent) in TabNavigator module?
  • a

    ambitious-knife-25690

    02/27/2020, 2:17 PM
    compilation
  • a

    ambitious-knife-25690

    02/27/2020, 2:17 PM
    I did try that as well but that also failed
  • a

    ambitious-knife-25690

    02/27/2020, 2:17 PM
    will retry
  • a

    ambitious-knife-25690

    02/27/2020, 2:19 PM
    screen is defined as
    static var Screen:TabNavigatorScreen;
  • a

    ambitious-knife-25690

    02/27/2020, 2:19 PM
    where tabnavigatorscreen is defined as
  • a

    ambitious-knife-25690

    02/27/2020, 2:19 PM
    Copy code
    haxe
    @:jsRequire('@react-navigation/material-bottom-tabs', 'createMaterialBottomTabNavigator().Screen')
    extern class TabNavigatorScreen extends ReactComponentOfProps<BaseScreenProps<TabNavigation>> {}
  • u

    user

    02/27/2020, 2:21 PM
    X.Y with classes only work from module X somehow
  • a

    ambitious-knife-25690

    02/27/2020, 2:21 PM
    I know maybe 2/3 years ago this syntax was possible
  • a

    ambitious-knife-25690

    02/27/2020, 2:21 PM
    I guess something changed in the interim
  • u

    user

    02/27/2020, 2:21 PM
    tink_hxx has been used, that may have been the change
  • u

    user

    02/27/2020, 2:22 PM
    Screen:TabNavigatorScreen
    is wrong though (you want to point to the class, not an instance of it)
  • u

    user

    02/27/2020, 2:22 PM
    static var Screen:ReactType = TabNavigatorScreen
    works
  • u

    user

    02/27/2020, 2:23 PM
    You probably don't even need to type hint
  • u

    user

    02/27/2020, 2:24 PM
    Fox externs you might need
    static inline var
  • a

    ambitious-knife-25690

    02/27/2020, 2:25 PM
    yeah, that works
1...424344...80Latest