DEV Community

Writing new websites the old fashion way

Quintus Cardozo on October 23, 2020

I needed to build a new react site so I fired up creat-react-app in my terminal. While I was waiting for all those node modules to install, I start...
Collapse
 
mjgs profile image
Mark Smith

Perhaps I’m missing something, but I actually think your client side reload is quite a clever use of socket.io. What makes you not like it?

I also quite like how the Preact version of JSX you use looks just like HTML with js template literals. Are there any downsides to it?

Collapse
 
quintisimo profile image
Quintus Cardozo • Edited

Its not too big of a deal it's just that since there is no code pruning with a bundler that code will stay there. This is fine if you are making use of sockets in your project but if it is not needed it's just so extra code in production that does nothing.

So the htm parser is not tied to preact in any way. It can be easily used with any had library like react. Performance wise it should be just as performant as a normal jsx implementation that has not been uglified and minified.

Collapse
 
mjgs profile image
Mark Smith • Edited

Yeah maybe you’ll find a way to re-architect it so the dev code doesn’t get deployed into production. Using a socket.io ping to automatically reload the client app though is quite neat.

I like the general idea of not having compile steps, so I think it’s a worthwhile exploration imo. Thanks for sharing.

Collapse
 
crimsonmed profile image
Médéric Burlet

I thought old fashioned way was pure HTML, CSS, JS

Collapse
 
quintisimo profile image
Quintus Cardozo

Technically this applications only contains HTML and JS

Collapse
 
crimsonmed profile image
Médéric Burlet

Hence the use of the word pure for not using framework and others 😂

That's what I did for fine. React can be overkill sometimes

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

You can always go further back, more old fashioned yet is to pin a physical note to a message board, but we all know what OP meant ;)

Collapse
 
mshajid profile image
mshajid

it is complicated in pov