joshbrew / sComponent

React Components with a convenient, low code state manager, does not change any syntax on the components but adds cross-component/cross-script awareness
0 stars 0 forks source link

Possible alternative with less code? Or maybe not? #1

Open dumblob opened 2 years ago

dumblob commented 2 years ago

I noticed you really want to "get the job done" in your projects. That's an awesome attitude.

Maybe the following will inspire you in your endeavors. It has some potential to save you some time :wink:.

https://hotwired.dev/

(note I'm in no way affiliated with them)

Feel free to close this for lack of actionable items.

One way or another, keep up the good work!

joshbrew commented 2 years ago

Thanks, yeah I've shied away from server side rendering, lately am getting into web components which is finally feeling like how I should be doing this. I just made this lib to be lazy in the react project we're working on but I wrote a native web component lib here that's pretty similar: https://github.com/moothyknight/domelement

dumblob commented 2 years ago

Thanks, yeah I've shied away from server side rendering, lately am getting into web components which is finally feeling like how I should be doing this.

That sounds interesting. Would you have any writeup about your journey?

I for myself didn't set out on such a journey yet (and not sure I'll ever will), so I'm eager to hear how it all developed in your case :wink:.

joshbrew commented 2 years ago

Haha am waiting to do more engineering design writeups when I finally feel qualified. But in brief:

I haven't seriously been coding until like 3 years ago, and even then it was sporadic for another year or so, long ways to go still I'd say. Just starting to feel sort of comfortable with data structures & algorithms but I am mostly self taught there so I don't have much to compare to.

Also main reason NOT to do serverside rendering is for standalone applications. I treat everything like its gonna be an application not a web page. The web page part basically now serves as a dynamic compiler and you can serve code blocks dynamically instead of just web pages. My brainatplay demo rarely is over 2mb on a page, so threejs etc only show up in the browser on demand rather than dumping a 100mb application on you with a thousand disconnected dependencies. Mainly I just like flexing with my 20kb apps haha, you ever see those 6kb game competitions? One guy made a 3d metroid demo with lighting and textures in 6kb.... the web should be that.

dumblob commented 2 years ago

Cool. Being self-taught means you're really much into the stuff. Which is great!

Also main reason NOT to do serverside rendering is for standalone applications. I treat everything like its gonna be an application not a web page. The web page part basically now serves as a dynamic compiler and you can serve code blocks dynamically instead of just web pages.

Ah, this didn't appear to me. I'll think about this as I'm genuinely offline-first/local-first guy :wink:. For some reason I never thought some might think server-side rendering is an obstackle for standalone apps (because it isn't :wink:). Thanks for mentioning this!

you ever see those 6kb game competitions? One guy made a 3d metroid demo with lighting and textures in 6kb.... the web should be that.

:+1:

joshbrew commented 2 years ago

I'm VERY into it haha, I've watched more of these damn lectures on computer science and math/ML/complex systems theory than I care to admit, I'm a slow learner though when it comes to practice but as long as I don't get hit by a truck in the meantime then I'll get REALLY good eventually.

It just depends on where you're coming from. I'm coming from doing my <100kb handwritten webapp served on an ESP32 to handle its data stream with a default UI, so the browser has all of the dependencies and it can pull third party resources if it connects through local wifi but that's not necessary. Was a good lesson in resource management haha. Local computers are so good now that doing SSR on a local node server would be a bit moot as you already have a whole browser engine in front of you.

dumblob commented 2 years ago

I'm VERY into it haha, I've watched more of these damn lectures on computer science and math/ML/complex systems theory than I care to admit, I'm a slow learner though when it comes to practice but as long as I don't get hit by a truck in the meantime then I'll get REALLY good eventually.

:smile:

It just depends on where you're coming from. I'm coming from doing my <100kb handwritten webapp served on an ESP32 to handle its data stream with a default UI, so the browser has all of the dependencies and it can pull third party resources if it connects through local wifi but that's not necessary. Was a good lesson in resource management haha. Local computers are so good now that doing SSR on a local node server would be a bit moot as you already have a whole browser engine in front of you.

Yep, that's admittedly a bit different use case which splits the burden among two servers - one on ESP32 and one is Chrome Web Store - with the latter needing some manual intervention to make it behave similarly to PWA.

I'll follow from time to time what you're working on. I hope some day I'll find some use of your creations (HEGs etc.) and support you also financially.