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

    brainy-machine-50829

    01/08/2020, 2:24 PM
    I think if I knew how to use all this, I would enjoy working with it. 😄
  • a

    ambitious-knife-25690

    01/08/2020, 2:24 PM
    im gonna probably spend a considerable amount of time trying to figure that out
  • a

    ambitious-knife-25690

    01/08/2020, 2:25 PM
    what do the macros
    @:publicProps(PublicProps)
    and
    @:wrap(Styles.withStyles(styles))
    do?
  • a

    ambitious-knife-25690

    01/08/2020, 2:27 PM
    i also see no definition for
    styles
  • u

    user

    01/08/2020, 2:30 PM
    https://github.com/kLabz/haxe-react/blob/next/doc/wrapping-with-hoc.md
  • u

    user

    01/08/2020, 2:30 PM
    styles
    is the public static function
  • a

    ambitious-knife-25690

    01/08/2020, 3:09 PM
    what does
    HOC
    stand for? 😅
  • u

    user

    01/08/2020, 3:09 PM
    Higher Order Component
  • u

    user

    01/08/2020, 3:09 PM
    A thing wrapping your component and extending it (usually by altering its
    context
    or adding/modifying its props)
  • a

    ambitious-knife-25690

    01/08/2020, 3:10 PM
    so it's like
    class Foo extends BaseComponent
    ?
  • a

    ambitious-knife-25690

    01/08/2020, 3:10 PM
    what's the pro over just extending a BaseComponent?
  • u

    user

    01/08/2020, 3:11 PM
    It's not extending the OOP way
  • u

    user

    01/08/2020, 3:11 PM
    Bad choice of words I guess, enhancing maybe?
  • b

    brainy-machine-50829

    01/08/2020, 3:12 PM
    Decorating.
  • u

    user

    01/08/2020, 3:13 PM
    Maybe
  • u

    user

    01/08/2020, 3:13 PM
    It's adding features (with react router, you get read/write access to location-related things; with redux you get access to the store, withStyles adds jss support, etc.)
  • a

    ambitious-knife-25690

    01/08/2020, 3:21 PM
    Ohh I seee
  • a

    ambitious-knife-25690

    01/08/2020, 3:21 PM
    So it's somewhat like how
    Refs
    were used
  • u

    user

    01/08/2020, 3:22 PM
    Refs?
  • a

    ambitious-knife-25690

    01/08/2020, 3:27 PM
    react-native refs
  • a

    ambitious-knife-25690

    01/08/2020, 3:27 PM
    this.ref.comp.openDrawer()
    or somerthing like that
  • u

    user

    01/08/2020, 3:29 PM
    Maybe, I don't know them
  • a

    ambitious-knife-25690

    01/08/2020, 3:30 PM
    I think that feature has been removed with modern day rn
  • a

    ambitious-knife-25690

    01/08/2020, 3:34 PM
    Is there a solution to this syntax
    Copy code
    width: `calc(100% - ${drawerWidth}px)
    ?
  • u

    user

    01/08/2020, 3:34 PM
    With haxe string interpolation?
  • a

    ambitious-knife-25690

    01/08/2020, 3:35 PM
    It's a style defined in drawers for mat ui
  • u

    user

    01/08/2020, 3:35 PM
    If what you need is access to a global "drawerWidth", you can use the theme
  • a

    ambitious-knife-25690

    01/08/2020, 3:36 PM
    the main issue is the ` character
  • h

    hundreds-dentist-88554

    01/08/2020, 3:38 PM
    i would love if there was a singular
    create-react-haxe-app
    project
  • u

    user

    01/08/2020, 3:38 PM
    Use haxe string interpolation (so
    '
    instead)
1...242526...80Latest