2024-03-12 09:21:00
The future of the web: navigating #HTMX, vanilla #JavaScript, and #React
The future of the web: navigating #HTMX, vanilla #JavaScript, and #React
Unfortunately, I seem to be stuck in a Fediverse echo chamber that loves to trash talk React and make fun of it—primarily by folks who, I presume, mostly don’t work on large-scale web applications.
I'd really love to break out of that echo chamber and find more developers who post good React content and are in tune with the React world.
#react
I wrote up a small article on how to structure providers in #react. By splitting data in to different providers you can save a lot of render time around the app.
https://stefanhayden.c…
About every time I think about an architectural problem in a #react application, I think: "This could easily be solved using a context!". Then I remember that the context API does not work with react server components and I'm lost.
:-(
#React is still a mystery to me.
When or better how do I save data, when I should put all hooks before conditionals. I don’t get it.
I know, hating #react is rather popular right now. I am still a fan, but what frustrates me is that React Server Components do not support the Context API. This takes one of the most powerful architectural tools from me, and I haven’t found an alternative that works both in RSC & in client components :/
✍️ I really enjoy working with Storybook, but I've found that it's very easy to end up repeating a component's arguments quite a bit. Well, I'm here to say that there is a better way! A DRYer way!
(And I have to remind myself of it every single time I set up a new codebase, so I thought I'd finally write it down 😉)
#StorybookJS #React