Skip to content
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

Discussion for a new feature - Template Fragments #159

Open
mat02 opened this issue Dec 17, 2024 · 0 comments
Open

Discussion for a new feature - Template Fragments #159

mat02 opened this issue Dec 17, 2024 · 0 comments

Comments

@mat02
Copy link

mat02 commented Dec 17, 2024

Feature Request: Support for Template Fragments

Description
I’d like to propose adding support for template fragments in EdgeJS. When working with libraries like HTMX and DataStar, it’s often necessary to re-render small sections of a template in response to user interactions on the page.

Currently, this functionality can be achieved by breaking templates into components or partials. However, this approach tends to create an excessive number of small files, each containing minimal markup, which can make code harder to manage.

Proposed Feature
Introduce a mechanism to allow re-rendering specific subsections of a single template file without the need to split it into multiple components. This would streamline development while retaining the flexibility needed for partial updates.

Rationale
Adding support for template fragments would greatly improve developer experience when working with interactive libraries like HTMX and similar tools. For more context and examples, please refer to the following article: Template Fragments in HTMX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant