Just trying to understand better. So Redux makes using nested structures more prolific, and nested structures don't work well with immutability (also I claim are hard to read), and immutadot ensures you can keep doing this and stay immutable? I have an honest few questions (because I lack in this area).
Should we be encouraging this nested structure and does immutadot actually help to make it more readable? Does readability still suffer and immutadot just a library to ensure you can keep doing this and bandaids the immutability issue?
First of all, weβre not encouraging the use of nested structures ; however if you have no choice, or if nested structures are a good fit for your needs, immutadot is here to help.
It results in a more concise syntax. In my opinion immutadot also brings more meaning to operations by using well-known function names. We are mostly based on ES2015+ so itβs easy to learn.
Hope it helps. Donβt hesitate to ask if you have more questions!
That absolutely answers and yes, it is obviously more readable. I guess the next step is for me to try and apply it to some of my own code. So it, in fact, replaces the nested structure with something more declarative and moves the harder to read nested stuff out replaced with something that should be more readable and also probably reduces the possibility of syntax errors in that nested structure. I like it the syntax of set() and how it's still readable!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Just trying to understand better. So Redux makes using nested structures more prolific, and nested structures don't work well with immutability (also I claim are hard to read), and immutadot ensures you can keep doing this and stay immutable? I have an honest few questions (because I lack in this area).
Should we be encouraging this nested structure and does immutadot actually help to make it more readable? Does readability still suffer and immutadot just a library to ensure you can keep doing this and bandaids the immutability issue?
Again, this is new territory for me.
Thank you for your question Eric!
First of all, weβre not encouraging the use of nested structures ; however if you have no choice, or if nested structures are a good fit for your needs, immutadot is here to help.
If you take this example from the article:
It can be done with immutadot like this:
It results in a more concise syntax. In my opinion immutadot also brings more meaning to operations by using well-known function names. We are mostly based on ES2015+ so itβs easy to learn.
Hope it helps. Donβt hesitate to ask if you have more questions!
That absolutely answers and yes, it is obviously more readable. I guess the next step is for me to try and apply it to some of my own code. So it, in fact, replaces the nested structure with something more declarative and moves the harder to read nested stuff out replaced with something that should be more readable and also probably reduces the possibility of syntax errors in that nested structure. I like it the syntax of
set()
and how it's still readable!