williamcotton.com

williamcotton.com (by williamcotton)

Williamcotton.com Alternatives

Similar projects and alternatives to williamcotton.com

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better williamcotton.com alternative or higher similarity.

williamcotton.com reviews and mentions

Posts with mentions or reviews of williamcotton.com. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-28.
  • React Use C
    5 projects | news.ycombinator.com | 28 Oct 2023
    These conditional checks are an obvious sign that they’ve cleaved the rock in the wrong location.

    These conditional checks on server state exist because they didn’t create the shared environment between web server and web browser at deep enough of a level.

    The key is to replicate the server-side pattern of “user actions cause HTTP request”. That is, you make a version of express that runs in the browser. Then you make parallel middleware that runs in both the browser and the server. Then you make your React components fire off mock HTTP requests that are handled by the browser express router.

    So you write the same route handlers and components for the browser and server to run but then you write environment specific middleware.

    Browser middleware:

    https://github.com/williamcotton/williamcotton.com/tree/mast...

    Server middleware:

    https://github.com/williamcotton/williamcotton.com/tree/mast...

    I’ve expanded beyond express in the above application to add controllers, a routes file, and views, all code that has no conditionals and runs in both the browser and server environment.

    What NextJS demoed is poorly conceived. There’s no need to autogenerate a link to an API.

    Instead, your frontend middleware has req.update() defined to make an API request and the server middleware has req.update() defined to make the SQL update.

    And there you go, sane server and client side rendering.

Stats

Basic williamcotton.com repo stats
1
2
7.4
8 days ago

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com