Skip to content

A good way to manage hx-requests vs full page reloads using spring-view-component #27

Answered by tschuehly
kev3978 asked this question in Q&A
Discussion options

You must be logged in to vote

Yeah that's probably the best idea. What I do is using a htmxutils class that checks if it's a hx request by getting the request from the http context statically.

Then in your viewcomponent you can either return the ViewContext or delegate to the nested ViewComponent that is used for rendering.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@kev3978
Comment options

@tschuehly
Comment options

Answer selected by kev3978
Comment options

You must be logged in to vote
1 reply
@tschuehly
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants