:props Directive
The :props directive in Regor is used to bind expressions to a component’s property, allowing dynamic updates. It is similar to the r-bind directive but specifically focuses on passing properties to components.
The :props directive has the same syntax as the r-bind directive, allowing you to define component properties.
<MyComponent :props="{ title: 'My Component Title' }"></MyComponent>MyComponent: The registered component name.title: The name of the property you want to bind.
- The
:propsdirective enables binding properties not defined in component’s props definition.