https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • g

    great-article-50141

    05/08/2023, 8:00 PM
    When they have to look outside React (or insert many other frameworks here), they're so scared, they pee a little and then scream against the idea they even have to consider letting go of React
  • g

    great-article-50141

    05/08/2023, 8:00 PM
    Basically, they're Gollum and React (or other frameworks) are their ring
  • g

    great-article-50141

    05/08/2023, 8:00 PM
    https://tenor.com/view/why-shouldnt-i-keep-it-its-mine-i-found-it-i-want-it-bilbo-baggins-gif-22374768
  • m

    mysterious-toddler-20573

    05/08/2023, 8:05 PM
    it is difficult to get a man to understand something, when his salary depends upon his not understanding it
  • g

    great-cartoon-12331

    05/08/2023, 8:40 PM
    i saved this quote 😂 built using htmx btw

    https://cdn.discordapp.com/attachments/725789747212976259/1105232703206469712/Screen_Shot_2023-05-08_at_16.39.38.pngâ–¾

  • b

    billions-window-36824

    05/08/2023, 8:41 PM
    no idea how anyone makes sense of react
  • b

    billions-window-36824

    05/08/2023, 8:41 PM
    just looks like a whole load of hoops to jump through
  • b

    billions-window-36824

    05/08/2023, 8:43 PM
    the only "framework" i like is svelte
  • b

    billions-window-36824

    05/08/2023, 8:43 PM
    in quotes because its not actually a framework obviously
  • m

    mysterious-toddler-20573

    05/08/2023, 9:42 PM
    https://tenor.com/view/dwight-office-theoffice-nude-rainn-wilson-gif-5664157
  • m

    mysterious-toddler-20573

    05/08/2023, 9:42 PM
    \> infinitely faster i have to admit this is one area where I just don't have enough experience (w/ vue, react, etc.) since I built intercooler.js and just stayed w/ that. People ask me to compare htmx w/ those frameworks or start saying stuff like "well, how do you transpile the server side hydration into your reactive core without the hooks blowing up?" and I'm like...
  • m

    mysterious-toddler-20573

    05/08/2023, 9:44 PM
    i feel like I should really build a react app at some point just so I know wth i'm even talking about when comparing them
  • g

    gorgeous-airport-54386

    05/08/2023, 9:45 PM
    i tried to build a todomvc in react once
  • g

    gorgeous-airport-54386

    05/08/2023, 9:46 PM
    i did everything the obvious way and for some reason it had multi-second lag spikes
  • m

    mysterious-toddler-20573

    05/08/2023, 9:47 PM
    this is one reason why I really value the feedback of folks like @great-article-50141 and @melodic-advantage-28381 who have walked the walk
  • g

    great-cartoon-12331

    05/08/2023, 9:57 PM
    i deal with React in production sometimes, and the problem is almost always someone forgot to add a hook dependency in the array...
  • m

    mysterious-toddler-20573

    05/08/2023, 9:57 PM
    help me understand this
  • m

    mysterious-toddler-20573

    05/08/2023, 9:57 PM
    my understanding is that react reacts to data changes
  • m

    mysterious-toddler-20573

    05/08/2023, 9:58 PM
    so what are hooks?
  • m

    mysterious-toddler-20573

    05/08/2023, 9:58 PM
    the sound like events/callbacks
  • m

    mysterious-toddler-20573

    05/08/2023, 9:58 PM
    but that doesn't sound very reactive to me
  • g

    great-cartoon-12331

    05/08/2023, 9:59 PM
    it's a callback for a lifecycle change (component was loaded for the first time, component was rendered, etc.)
  • m

    mysterious-toddler-20573

    05/08/2023, 9:59 PM
    and what sort of code do you write in these hooks?
  • g

    great-cartoon-12331

    05/08/2023, 10:01 PM
    you can e.g. make network requests, change the internal state of the component, anything which is not purely 'render HTML'. with hooks they were trying to compartmentalize these impure parts inside callbacks so they wouldn't interfere with the main render loop
  • m

    mysterious-toddler-20573

    05/08/2023, 10:01 PM
    mmm
  • b

    boundless-author-22679

    05/08/2023, 10:01 PM
    https://medium.com/swlh/react-what-are-hooks-and-why-should-you-use-them-bf1e79788305
  • b

    boundless-author-22679

    05/08/2023, 10:02 PM
    this has a fairly simple example
  • b

    boundless-author-22679

    05/08/2023, 10:02 PM
    basically you have a state or set of states that can be changed and the component will react to the change "on it's own"
  • g

    great-cartoon-12331

    05/08/2023, 10:02 PM
    React is like a mini runtime for pure HTML rendering + impure effects, it decides when to interleave them
  • b

    boundless-author-22679

    05/08/2023, 10:03 PM
    the first impression looking at hooks can be pretty awful but they actually make some sense once you work with them
1...111811191120...1146Latest