Skip navigation
Just Hotwire, no React
0:00 / 0:25

Just Hotwire, no React

Josef Strzibny

@strzibnyj5.3K followers

Visit on X
195 likesDownloadOriginal post

16,939 views

Just Hotwire, no React

25 Comments

Comments from the original post on X (Twitter)

  • mnkhod's profile picture

    @0xMnkhod

    react users : hotwire isn't productive hotwire users :

    9 likes

  • Josef Strzibny's profile picture

    @strzibnyj

    Perfect

    2 likes

  • Ben Wilson's profile picture

    @benwilsondev

    People don't know how much mileage you can get with Hotwire and Stimulus. They need a moving van, but chose a semi-trailer like React

    5 likes

  • Dago | Recovering perfectionist's profile picture

    @dagorenouf

    much cleaner

    2 likes

  • Kamil Dzieniszewski's profile picture

    @dzienko

    When the Wire is Hot, you should React; it could be a fire hazard.

    2 likes

  • Clive Foley's profile picture

    @clivefoley

    We’re are going back to the start. HTML over the wire. The way it should be

    2 likes

  • Ryan Townsend's profile picture

    @RyanTownsend

    I’m sure you’ve thought of this already but you might want `autocomplete=off` on that input to avoid the browser’s suggestions getting in the way 😌 Also throttling (not debouncing), AbortController, requestAnimationFrame and scheduler.yield are your friends for max performance.

    2 likes

  • Josef Strzibny's profile picture

    @strzibnyj

    What do you mean by AbortControlle?

  • Ryan Townsend's profile picture

    @RyanTownsend

    See: For example, if a user types a backspace, their current in-flight request is invalid, you can use AbortController to cancel it to reduce network traffic. Those APIs I listed were all vanilla JavaScript.

    2 likes

  • Josef Strzibny's profile picture

    @strzibnyj

    Thank you! I didn't know about this, actually.

  • Ryan Townsend's profile picture

    @RyanTownsend

    Pleasure! More people need to know about these APIs. Been meaning to record a YouTube video on how to make a really robust, high performance typeahead search component… maybe this is the trigger!

    2 likes

  • TheOneAndOnlyDunkirk's profile picture

    @one_dunkirk

    I've recently upgrade my main app from Rails 6 to 8 and converted to using Stimulus and Hotwire. It's so much cleaner than sticking JS in the views, and so much more maintainable. Is this your demo available somewhere? My last step will be Capistrano->Kamal. ;-)

    1 like

  • Josef Strzibny's profile picture

    @strzibnyj

    LakyAI (my product) is not yet public, but I am making a list of interested beta users if you are curious.

    1 like

  • Adrian Oprea's profile picture

    @oprearocks

    If it’s not react I’m not opening it! Jk

    1 like

  • Chad Moran's profile picture

    @ChadMoran

    Is the modal Stimulus?

    1 like

  • Josef Strzibny's profile picture

    @strzibnyj

    Yes, <dialog> opens with Stimulus

    1 like

  • LazyNisTa's profile picture

    @LazyNisTa

    Is the code available or is there a repo? I'm working on something similar and would love to see how you built it.

    1 like

  • Josef Strzibny's profile picture

    @strzibnyj

    No, because this is my project LakyAI. Happy to do some write up later but rn dont have that much time for it unfortunatelly. But no magic in there.

    1 like

  • Andreas Finger's profile picture

    @mediafinger

    While the code needed is an enhancement, are you happy with the current Hotwire & Stimulus code, or do some parts feel too manual and error prone to achieve your solution?

  • Josef Strzibny's profile picture

    @strzibnyj

    I guess you can quickly get into a messy state with Stimulus when you are trying to combine 3 controllers together...