-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reflexion on my usage #407
Comments
As a side note, I've also thought about using "Component Composition", where each of my pages are defined as Components with nested children, but I wanted to know if you guys had other solutions in mind. |
If you're already using Rust and HTMX, then you can try sprinkling in Alpine.js, which has directives like |
This seems like a great idea! How would one use |
I used x-data and x-init to create a toy weather report page, with x-data providing the props to the DOM element and x-init hitting an API to fetch it. I'm not an expert at Alpine, but would recommend it as something that has been easy to pick up on a small, light project. No maud templates in my repo yet, so hopefully you'd be willing to share some code when you get Alpine + Maud working together neatly! |
Hey! I already had added Alpine to my project, and I'm still not sure how I could implement what you are saying. Here is my repo link though: https://github.com/olgam4/lelu I will look into yours. My personal problem spefically arises in my controllers (see hero page), where I define props to pass down the tree. |
I've been using maud for some time and definitely love this project! Thanks to everyone involved.
The html! macro lets us use our functions like components, like in jsx. But now, with code splitting and a SSR approach, I find myself having to drill down props from the page to every component which on first render, should or should not appear (ie: a navbar with or without logout).
What I like about maud is that I can use rust and htmx, without having much js on the page. React and the likes have solved props drilling with the Context API, but I'm wondering if I could find some way to render the html! whilst still using "components" without such a solution and without having to manage a state or something...
Do you guys have a simple neat
solution to this?
The text was updated successfully, but these errors were encountered: