Next one is, if a user builds a cart without JS and then turns on JS to pay, how do you maintain the cart items? Well, if you have the cart itself on a server side in the user's session, then it doesn't matter if the user has JavaScript enabled or not, because, you know, it always lives on the server side, and as long as the user is authenticated and the current checkout session is linked to them, it will be no issue. Sounds good.
How does this approach affect performance for users who don't disable JavaScript? Well, it depends on the techniques that you use, but generally it doesn't really hurt the performance. So, for example, the things I showed with the form submissions, like, you get both, the best of both worlds. So you get the fallback to a more traditional form submission, but it doesn't ruin the experience for users who have JavaScript. So they still get all the benefits. I think the main trade-off here is that as a developer, you need to think about this more and sometimes the implementation turns out to be, it takes more time to complete, but from the user perspective, I think it's all good.
Same experience. Next one is, are no-script tags still handled by the browser if JS is enabled? Or would the required JS class still exist for a user with JS enabled? I'm not quite sure I understand the question. Do we want a follow-up on the question? Do we know who the question came from? Maybe one of our, yes. Yes. Yes. Would the data be sent to the user with JS enabled? Well, the data itself would be still included in the page payload. It's just the browser when it processes the CSS. It would go through the style sheet, but ignore this part inside of the noscript tag if JavaScript is available. Thank you. Thank you for the follow-up. The next one we have, sorry, the screen just refreshed, let's give it a moment. I'm seeing some of the questions we already addressed. We're having a little bit of redundancy. Can you give an example that using non-JS implementation is better than using JS? I think we may have covered. Well, probably this approach makes the most sense for the applications that have a lot of traffic, they have a lot of users, so the impact on the 0.2% is actually significant. So I think New York Times, just to give like a very specific example, is very good at this because even their more interactive articles that use animated SVG visuals to support the idea, they still work without JavaScript enabled. On the flip side, there is a website like Medium where you can't even load the home page without JavaScript, so I think, well, the simple answer is, I guess, a blog or a website giving you simple content should not require JavaScript for such a simple functionality.
Gotcha. And then the next one is this relies on server-side rendering. Is there a Node.js approach that works completely client-side? For example, render JSX to static HTML as a part of the build? Yes. If you don't need any data mutation or server at all, you can just use static site generation, static export with Next.js or Remix or even Gatsby, and it will still work. Next one is how do these server components differ from other historical apps that ran UI on the server side? Seems like we're slingshotting back. Well, it does seem that way, but there is a bit of an oscillation between the ideas that we had in the past on how we build applications and how we do it now.
Comments