Idea
@joeosburn-desiringgod recommended I open these ideas here.
It's pretty helpful to be able to declare some options to be passed into the component as required. By default, they would be optional. This helps ensure that the errors don't send us in the wrong direction. This especially happens when we have nested components.
Example:
<%= icon(type: 'arrow') %>
Here, type is required because anything else doesn't make sense (there is no default value for this one). Display some sort of error like "The component 'icon' requires type to be defined" (or something similar) would make our components easier to use and learn.
Idea
@joeosburn-desiringgod recommended I open these ideas here.
It's pretty helpful to be able to declare some options to be passed into the component as required. By default, they would be optional. This helps ensure that the errors don't send us in the wrong direction. This especially happens when we have nested components.
Example:
Here, type is required because anything else doesn't make sense (there is no default value for this one). Display some sort of error like "The component 'icon' requires type to be defined" (or something similar) would make our components easier to use and learn.