Map Schema
Reviving maps
To revive a map with string keys and any kind of data as values, the map schema can be used, to describe the type of the value expected in the map.
The values of the map have to be all of the same type i.e.
The map
schema is defined as
Basically, we need to specify a map
property which holds the schema information for all map values.
Here's an example of how to use it
In the example above, props
is a map with values of type Prop
.
Last updated
Was this helpful?