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
Could you please explain in the content of the "Couple of important remarks" (part2), in the code of the Exchange rate app why we cannot initialise state to an empty array [], instead of null? Both seem to produce the same result, but having an explanation in the content would be helpful.
The text was updated successfully, but these errors were encountered:
currency is just "one thing" so representing missing currency with an empty array does not feel semantically correct, a much better missing "thing" is null
if the state contains many things, such as notes, an empty collection is quite naturally represented with empty array []. null could also be used but [] feels better
I should and would write a better explanation in the text
Could you please explain in the content of the "Couple of important remarks" (part2), in the code of the Exchange rate app why we cannot initialise state to an empty array
[]
, instead ofnull
? Both seem to produce the same result, but having an explanation in the content would be helpful.The text was updated successfully, but these errors were encountered: