Dead simple State Management in Vanilla JavaScript
It's been years now since you started using Redux, MobX or even plain React Hooks and have no id...
For further actions, you may consider blocking this person and/or reporting abuse
Here is an optimised version :-)
You can test it here : SSMOPT
And if you want to get a little further
You can test it here IntroSamPattern
Hi @artydev- this is really interesting. I've not heard of the uthml package before. What exactly is it used/needed for vs the original package?
Thank you for your post.
Here is a variation :
You can test it here : SSM
Regards
This one is great. Makes better use of functional programming.
I don't want to come off sounding like an asshole, but is this satire?
It feels like someone whose never learnt JavaScript, and just copied react examples suddenly learnt how the language works... Unless I'm missing something fundamental.
Please, be comprehensive...
Are you sure you didn't want to come off sounding that way? I'm pretty sure you did.
This is a nice explaination and it helps you understand the state management concept behind the scene. Good work 🙌
Hi Vijay Pushkin,
I know this tutorial is not about the best code but I couldn't help myself from refactoring your code ;).
Hello,
here is the code of utml (877lines)
uhtml.js
You can test it here : uhtmltest
Optimized in a sense, it uses VDom Diff to update the page.
Regards
So happy to see some framework-agnostic content. This is a great read and shows sometimes we can get by just fine with the standard web technologies.
I was really wondering why you had _App and App but your justification is brillaint.
Great insight
Really into this, thank you for sharing! The cognitive burden of many frameworks is too high for what one gets in return.
I've found this routine to be helpful for rendering the state of arbitrary objects to the DOM. Additionally, when using standard HTML
template
tags, I've used another routine to populate slots (template parameters) and render the template at runtime.Vanilla javascript? I've never heard of that library.
When's the next article which I hope will be web components leverage native shadow Dom to handle updates when state changes :)
Nice article by the way. Good starting point.
Nice Insight on state management, waiting for the upcoming article.
Is your lastname really Pushkin? Like Alexander Sergeyevich Pushkin?
The place where I'm from, we don't have family names. So, yes both are my names!
Understood, cool. Pushkin is perhaps the greatest person in Russian literature. I am from Kazakhstan and we happen to speak and learn russian language at school. Anyways you have a great name!
Wow! 😮😍🥰 What an amazing tutorial! Now I can start writing my own front-end web framework. 😏😏😂😂 Just kidding, I won't! But I've always wanted to know how to. Thank you for the article! 💕💕
hey what does it mean when you add redraw in curly braces i.e return {redraw}. Please someone explain