Value components
Many screens summarize values from the data set statically, such as a final screen where the user can review the data they have entered before submitting it to the bank. To make displaying such data easier, a number of Value components have been created. These function similarly as field components. That is, they are data-driven, can be given value
-props, or connected to a surrounding DataContext.Provider by pointing to the relevant value they are to display with a path
-prop. They are also available with more functional variants for given types of data. Examples of Value components are:
Creating custom value components
The useValue
hook that is used in all existing value components is exported to make it possible to create custom value components that have the same properties and follow the same flow as the standard components, without the need to recreate all the basic state handling features.