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

    numerous-oil-90946

    01/28/2020, 8:06 AM
    I should do it in macro? ^^'
  • b

    brainy-machine-50829

    01/28/2020, 8:08 AM
    If the file is static at compilation, then yes, that makes sense.
  • b

    brainy-machine-50829

    01/28/2020, 8:08 AM
    If it's dynamic, but not a user file, rather an application file, you probably need a server (which can then do whatever is needed).
  • n

    numerous-oil-90946

    01/28/2020, 8:09 AM
    Okey I will try it then 🙂
  • n

    numerous-oil-90946

    01/28/2020, 8:09 AM
    But technicaly I can Http on the website files?
  • b

    brainy-machine-50829

    01/28/2020, 8:11 AM
    I don't understand the question.
  • n

    numerous-oil-90946

    01/28/2020, 8:13 AM
    I saw an exemple like this but can't find it again ^^'
  • u

    user

    01/28/2020, 8:15 AM
    You can either include it at compile time via a macro or read it at runtime via a http request
  • n

    numerous-oil-90946

    01/28/2020, 8:16 AM
    Yes thanks 🙂
  • n

    numerous-oil-90946

    01/28/2020, 9:10 AM
    Hey, can we iterate over an array in jsx()?
  • u

    user

    01/28/2020, 9:10 AM
    Are you using haxe's react or react-next haxelib?
  • u

    user

    01/28/2020, 9:11 AM
    If you're using react-next, you can do
    <for {p in people}>Hello {p.name}!</for>
    thanks to think_hxx
  • n

    numerous-oil-90946

    01/28/2020, 9:13 AM
    Okey i will install this one x)
  • h

    hundreds-dentist-88554

    01/28/2020, 3:17 PM
    does haxe-react support the new react hook stuff?
  • u

    user

    01/28/2020, 3:21 PM
    Nope
  • h

    hundreds-dentist-88554

    01/28/2020, 3:25 PM
    gotcha. this is the conversation for reference (its about moving Ogmo 3 to haxe-react). it doesnt seem like those new react features are really worth it, but i havent used 'em yet 🤷‍♂️
  • u

    user

    01/28/2020, 3:26 PM
    Hooks are just a bad solution for people that don't understand classes, so in a OOP language like haxe it doesn't make much sense
  • u

    user

    01/28/2020, 3:27 PM
    Functional components are supported, though
  • a

    ambitious-knife-25690

    01/28/2020, 3:28 PM
    I'm running latest react
  • u

    user

    01/28/2020, 3:28 PM
    And yeah, not worth adding haxe-react into this if you're mixing js and haxe generated js
  • a

    ambitious-knife-25690

    01/28/2020, 3:28 PM
    I have no idea what they mean by you can't use anything from the react ecosystem
  • u

    user

    01/28/2020, 3:28 PM
    I don't know, maybe they can't write externs
  • h

    hundreds-dentist-88554

    01/28/2020, 3:37 PM
    gotcha, thanks for the info guys :)
  • h

    hundreds-dentist-88554

    01/28/2020, 3:52 PM
    the question was raised by someone who hasnt really used haxe, so i understand their issues
  • u

    user

    01/28/2020, 3:58 PM
    Yeah, a common issue with moving to haxe from javascript is that you can't do all the [sometimes dirty] things you do in js
  • u

    user

    01/28/2020, 3:59 PM
    But we don't have 80% of our (runtime!) code that is just guessing the type of our inputs :D
  • h

    hundreds-dentist-88554

    01/28/2020, 4:00 PM
    thats worth it for me 😎
  • h

    hundreds-dentist-88554

    01/28/2020, 4:00 PM
    but then you often get the "why not Typescript" argument after lol
  • a

    ambitious-knife-25690

    01/28/2020, 4:01 PM
    Yeah lol I feel that pain
  • u

    user

    01/28/2020, 4:02 PM
    Because typescript is a half-arsed solution :D
1...383940...80Latest