Record Mutation
Explore how to handle record mutation in ReasonML by learning to define mutable fields and use the spread operator for copying records. Understand the process for updating nested records and gain foundational knowledge about data structures in ReasonML that prepares you for working with arrays and other types in future lessons.
We'll cover the following...
We'll cover the following...
Mutable Fields
Believe it or not, we can define some record fields as mutable. This means that we can change their values in the future.
To make a field mutable, we must prepend the mutable keyword to ...