One of the best videos out there, what you are saying is gold, I’m known with a project that got a really bad design decision and trying to implement many patterns and principles that in the paper makes a lot of sense but in practice you need to be a rocket science to implement an easy thing on JavaScript… as you mentioned, always take a step back and ask, is it really so simple that every person can understand easily or not? If the question is not you probably doing something wrong. The API that devs will work with must be the simplest thing and not to over complicate. Even the devs don’t have to be aware of what’s going behind the scene, write code that gives the best interface to work with. Svelte is a great example, you want to declare state? Declare a variable. You want to mutate state? Reassign the variable, simple as it is! Just shared what’s on my mind 😄
Yeah you’re exactly right. Svelte is the best example for kiss. Something like redux (not toolkit) is a perfect example of where kiss went wrong. I think it’s easier for smart people to over complicate things and it doesn’t seem complex because they are the ones who wrote it. It’s very easy to start implementing Gang of Four design patterns and abstracting everything at the cost of having a code base no one can easily follow. Thanks for your longer comments, good info!
Sure thing, comments from y’all help me question myself and my thought process as well, so it’s super useful. I like when people call me out when they think I’m wrong or misspoke on a topic
"kinda" not fair comparison of react and svelte for state manipulation. In react you also can create a function "incrementCounter" and pass it to onclick w/o cluttering the jsx with function generation. And the resulting code will be quite similar.
Similar, but not the same. React likes immutable updates which is typically more complex than just mutating a variable. Sure, this was a trivial example but as react applications grow larger and you’re setting state from useEffects and you’re forced to user setter callbacks and chain state effects together, it becomes complex quickly
@@WebDevCody sure, the example is simple but also a contrived one to bash on react. But the vibes from the video are that only switching to another library you will get the desired KISS outcome. Is it so? Maybe. Im not versed in svelte nor am an Expert in react, but if the app becomes difficult and convoluted, I think that is when those high-level "patterns" come into play in order to simplify it.
@@WebDevCody in your two examples one of them you made a variable, the other you made a variable using useState. All the stuff you say about passing a function to the on click is true for both frameworks so its a red Herring.
@@noahwinslow3252 Im not sure I follow. In svelte it’s a variable but you can update it and the web page will rerender. In react, you can’t just update the variable, you need to call a setter function to update it. My point, which I guess I didn’t clarify well, is state is clunky in react compared to svelte. There are easier ways to manage state in a Ui framework.
@@WebDevCody I think honestly its the way it was presented in your video. I think I can be on board with your general complaint that state-management or even getter-setter dynamics is not following KISS but simultaneously, one might argue that it follows KISS later on down the road when you want to do more complicated things that the state-managment (or get-set) nuance becomes valuable (say binding UI components to variable updates)
@@noahwinslow3252 that makes sense I think. I guess I’m more of a fan of immer. I think the immutable state react forces on devs was a bad choice, but that’s just my opinion
One of the best videos out there, what you are saying is gold, I’m known with a project that got a really bad design decision and trying to implement many patterns and principles that in the paper makes a lot of sense but in practice you need to be a rocket science to implement an easy thing on JavaScript… as you mentioned, always take a step back and ask, is it really so simple that every person can understand easily or not? If the question is not you probably doing something wrong. The API that devs will work with must be the simplest thing and not to over complicate. Even the devs don’t have to be aware of what’s going behind the scene, write code that gives the best interface to work with.
Svelte is a great example, you want to declare state? Declare a variable. You want to mutate state? Reassign the variable, simple as it is!
Just shared what’s on my mind 😄
Yeah you’re exactly right. Svelte is the best example for kiss. Something like redux (not toolkit) is a perfect example of where kiss went wrong. I think it’s easier for smart people to over complicate things and it doesn’t seem complex because they are the ones who wrote it. It’s very easy to start implementing Gang of Four design patterns and abstracting everything at the cost of having a code base no one can easily follow. Thanks for your longer comments, good info!
Thanks for sharing your thoughts and engaging in comments.
Sure thing, comments from y’all help me question myself and my thought process as well, so it’s super useful. I like when people call me out when they think I’m wrong or misspoke on a topic
"kinda" not fair comparison of react and svelte for state manipulation. In react you also can create a function "incrementCounter" and pass it to onclick w/o cluttering the jsx with function generation. And the resulting code will be quite similar.
Similar, but not the same. React likes immutable updates which is typically more complex than just mutating a variable. Sure, this was a trivial example but as react applications grow larger and you’re setting state from useEffects and you’re forced to user setter callbacks and chain state effects together, it becomes complex quickly
@@WebDevCody sure, the example is simple but also a contrived one to bash on react. But the vibes from the video are that only switching to another library you will get the desired KISS outcome. Is it so? Maybe.
Im not versed in svelte nor am an Expert in react, but if the app becomes difficult and convoluted, I think that is when those high-level "patterns" come into play in order to simplify it.
Good job babe!!!!!
Sorry but downvoted for nearly identical svelte and react example.
But they are not identical. One uses an immutable approach and the other mutates variables. One is easier, one is more complex imo
@@WebDevCody in your two examples one of them you made a variable, the other you made a variable using useState. All the stuff you say about passing a function to the on click is true for both frameworks so its a red Herring.
@@noahwinslow3252 Im not sure I follow. In svelte it’s a variable but you can update it and the web page will rerender. In react, you can’t just update the variable, you need to call a setter function to update it. My point, which I guess I didn’t clarify well, is state is clunky in react compared to svelte. There are easier ways to manage state in a Ui framework.
@@WebDevCody I think honestly its the way it was presented in your video. I think I can be on board with your general complaint that state-management or even getter-setter dynamics is not following KISS but simultaneously, one might argue that it follows KISS later on down the road when you want to do more complicated things that the state-managment (or get-set) nuance becomes valuable (say binding UI components to variable updates)
@@noahwinslow3252 that makes sense I think. I guess I’m more of a fan of immer. I think the immutable state react forces on devs was a bad choice, but that’s just my opinion
Thanks for video! Glory to Ukraine!