3 ms·
How do you server-side render something like a chat app? You'd still need a fair amount of client-side JS, right, unless you want to reload the page every time
by hot_gril 2y ago
How do you server-side render something like a chat app? You'd still need a fair amount of client-side JS, right, unless you want to reload the page every time someone hits send. I remember old sites that worked that way.
React is easy and intuitive. No templates, and I can change the HTML however I want in response to what the user does. Not that I do fancy things or enjoy single-page apps, but even if you have that, deep-linking is easy.
- itronitron 2y ago>> React is easy and intuitive to me. so, how different is React now from where React was in 2016? The JS/SPA developers I worked with then would refuse to touch it or any of the other frameworks. We just wrote our own callback functions to handle the interactivity and data updates.
- hot_gril 2y agoI'm not primarily a frontend dev and am probably not doing things the trendy way. I started using React and RN in 2018, I adopted the Hooks syntax when it came out in 2019, then I avoided the newer frameworkey stuff like Next.js. Also didn't mess with Redux.
- timw4mail 2y agoA chat app is one of those relatively few cases where React makes some sense. But, React is easy and intuitive to use for the use case that makes the least sense. Once you get to complex state, I'd argue that React doesn't help much. There are a lot of different tools and ways to manage state, but the way React takes over rendering often leads to weird and confusing bugs, as the 'declarative' syntax is a *very* leaky abstraction.
- hot_gril 2y agoWeb apps with dynamic behavior are pretty common. I've written some of those, but I also found React easier just for mostly-static webpages that need somewhat flexible layout. You can do most of that with CSS instead, but it tends to involve super specific knowledge and hacks. Vs having a convenient, generalized way to change the DOM at will.