Comments (4)
Hi @jch-neos, you should be able to use the hx-trigger
with a custom event. That said, I have found using out-of-band
updates to also be a good way to update chrome elements (things in the header).
https://htmx.org/attributes/hx-trigger/
from htmx-aspnetcore.
I see how you implemented it and how your last commit corrects the issue (I was getting ready to make a pull request for that 😆)
However I still have a feeling of a scaling issue since you have to include every possible change in you update.
Even using composition like you did it's seems complexe to manage all possible updates linked to an event.
from htmx-aspnetcore.
@jcheritat it's true, it depends on what you're attempting. If you can have some UI lag then invoking an hx-trigger
event after the response comes back would be easier to logic about. All about trade-offs and compromises. :)
I really should think about creating an HTMX.NET online user-group where we can talk about this stuff. 😅
from htmx-aspnetcore.
👋 Hi folks. I wrote a sample thanks to a blog post from Htmx.Net contributor showing how to use Hx-Trigger
to listen and react to global events coming from the server.
This is a nice way to scale up your UI if you don't want to use out-of-band swaps. Try it out!
https://github.com/khalidabuhakmeh/HxTriggerSample
from htmx-aspnetcore.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from htmx-aspnetcore.