Hello,
I am new to Elixir, I am looking for a good practice to reuse partial templates. For example a generic text_input
already wrapped by a styled div, form label and error.
Of course with render
function but I think there is a better way.
Perhaps with a view helper?
Or with components?
- Views and templates — Phoenix v1.6.2
- Best practices for defining function components - #2 by bdtomlin
Also, this would be useful for me to make reusable component like Card, Article, Comment, Message, … (like in Jinja, Laravel’s Blade, React.js, Marko.js, Vue, etc)
Any advice, example, tuto is welcome