Conditionals

When viewing data that can have different shapes it can be viewed differently depending on the specific data.

This app renders a user name but only if it is known. The option type is used to hold a value that might not exist. If there is no user then the "None" value is used.

Try changing Some("Louis") to None.

In some situations there might be nothing to show. The "none" element can be used to indicate there is nothing to show.

Try replacing `text("hello stranger")` with `none()`.