Re:Why I'm not a React Native developer
by joesb on Sunday August 20, 2017 @03:45AM
(#15057395)
it depends on how you want to structure your code and give sections to code.
"if (isConnected) {} else {}" emphasizes to me that there are two branches of code which depends on `isConnected` state. It may have only one thing to do right now. But this is major branch. Future git diff will probably show that the code in the body the branch are added/removed.
Ternary expression emphasizes on modification of a single attribute.
"if (isConnected) {} else {}" emphasizes to me that there are two branches of code which depends on `isConnected` state. It may have only one thing to do right now. But this is major branch. Future git diff will probably show that the code in the body the branch are added/removed.
Ternary expression emphasizes on modification of a single attribute.