What Is A Property Wrapper in Swift?
They are SO useful
2 min readMar 31, 2022
Difficulty: Beginner | Easy | Normal | Challenging
Prerequisites:
None
Terminology:
Property Wrapper: A property wrapper adds a layer of separation between code that manages how a property is stored and the code that defines a property
The Context
We can calculate the area of a square. It’s not too tricky, so we can use the multiplication operator to calculate an area and the sqrt
function to return an edge from an area.
Nothing too tricky here! (hopefully)