You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I notice to much confusion between "null" and "undefined".
it's not a javaScript way to handle Object by using the class Map. it's better to use JSON Object.
you are mixing null and undefined
1 - if infos is undefined you also should return null (or undefined) => if (!infos){...}
2 - why testing infos?.id but not infos.name ?
Comments posted by @capyq in powsybl/powsybl-incubator#267 which were on the code extracted from https://github.com/gridsuite/gridstudy-app
This should be cut later in pieces to separate the easy parts from the most difficult ones (like typescript).
Originally posted in powsybl/powsybl-incubator#267 (comment)
I notice to much confusion between "null" and "undefined".
it's not a javaScript way to handle Object by using the class Map. it's better to use JSON Object.
Originally posted in powsybl/powsybl-incubator#267 (comment)
Originally posted in powsybl/powsybl-incubator#267 (comment)
Originally posted in powsybl/powsybl-incubator#267 (comment)
Originally posted in powsybl/powsybl-incubator#267 (comment)
it's more readable
Originally posted in powsybl/powsybl-incubator#267 (comment)
why doing this at the end ?
this is cost expensive and if it's needed, you should add an else statement on the fullrender check (line 108)
Originally posted in powsybl/powsybl-incubator#267 (comment)
this should be a "const" you never asign it after this line
Originally posted in powsybl/powsybl-incubator#267 (comment)
does "null" and undefined are separate ? if not, you better use this version
Originally posted in powsybl/powsybl-incubator#267 (comment)
does null and undefined are two expected value ? if not, prefer short version
Originally posted in powsybl/powsybl-incubator#267 (comment)
separate in two lines we don't understand what should not be undefined
Originally posted in powsybl/powsybl-incubator#267 (comment)
this method is never used
Originally posted in powsybl/powsybl-incubator#267 (comment)
you are mixing null and undefined
1 - if infos is undefined you also should return null (or undefined) => if (!infos){...}
2 - why testing infos?.id but not infos.name ?
Originally posted in powsybl/powsybl-incubator#267 (comment)
those are not else if but only if and you don't need else case because you return each statement
Originally posted in powsybl/powsybl-incubator#267 (comment)
It's not a good practice to use variable to store component React doesn't tag this as react component and re-render it more than needed.
The text was updated successfully, but these errors were encountered: