Name | 7 |City | 9 |Phone | 10 ||
---|---|---|---|
No contacts with that name found. | 15 ||||
21 | 22 | @contact.Name 23 | 24 | | 25 |26 | 27 | @contact.Email 28 | 29 | | 30 |31 | 32 | @contact.City 33 | 34 | | 35 |36 | 37 | @contact.Phone 38 | 39 | | 40 |
This is a demo on how to use Minimal APIs + Razor Components + HTMX to create dynamic server side rendered apps.
11 | Explore the crud example 12 |13 | You can check out the repo here 14 |
15 |16 | Using Minimal APIs and Razor components is possible because of a new class in .NET 8: RazorComponentResult 17 |
18 |This returns an IResult after initializing a Razor component, making it possible to use Razor components in Minimal APIs.
19 |23 | Requires .NET 8 RC1 installed. 24 |
25 |29 | The HTMX attribute hx-boost turns internal links into ajax calls. This speeds up site speed since there are no full page reloads. You can opt in and out of this behavior on a link by link basis. 30 |
31 |32 | This app uses hx-boost on the body tag, turning on this functionality for all links. 33 |
34 |38 | The HTMX attributes hx-get and hx-post sets up ajax calls to endpoints and swaps html on the page with what was returned. 39 |
40 |41 | This is useful for submitting forms, searching tables, and modifying the dom from a user interaction on the page. 42 |
43 |47 | The HTMX attribute hx-trigger can be used to poll the server. This can setup ajax calls to endpoints at an interval and swap html on the page with what was returned. 48 |
49 |50 | Below is random number generator. 51 |
52 |58 | HTMX calls /random-number every 2s and replaces the html with the html returned by the endpoint. 59 |
60 |John Doe
24 |John Doe
23 |Name | 10 |City | 12 |Phone | 13 ||
---|---|---|---|
No contacts with that name found. | 18 ||||
24 | 25 | @contact.Name 26 | 27 | | 28 |29 | 30 | @contact.Email 31 | 32 | | 33 |34 | 35 | @contact.City 36 | 37 | | 38 |39 | 40 | @contact.Phone 41 | 42 | | 43 |
This is a demo on how to use Minimal APIs + Razor Components + HTMX to create dynamic server side rendered apps.
11 | Explore the crud example 12 |13 | You can check out the repo here 14 |
15 |16 | Using Minimal APIs and Razor components is possible because of a new class in .NET 8: RazorComponentResult 17 |
18 |This returns an IResult after initializing a Razor component, making it possible to use Razor components in Minimal APIs.
19 |23 | Requires .NET 8 RC1 installed. 24 |
25 |29 | The HTMX attribute hx-boost turns internal links into ajax calls. This speeds up site speed since there are no full page reloads. You can opt in and out of this behavior on a link by link basis. 30 |
31 |32 | This app uses hx-boost on the body tag, turning on this functionality for all links. 33 |
34 |38 | The HTMX attributes hx-get and hx-post sets up ajax calls to endpoints and swaps html on the page with what was returned. 39 |
40 |41 | This is useful for submitting forms, searching tables, and modifying the dom from a user interaction on the page. 42 |
43 |47 | The HTMX attribute hx-trigger can be used to poll the server. This can setup ajax calls to endpoints at an interval and swap html on the page with what was returned. 48 |
49 |50 | Below is random number generator. 51 |
52 |58 | HTMX calls /random-number every 2s and replaces the html with the html returned by the endpoint. 59 |
60 |Name | 10 |City | 12 |Phone | 13 ||
---|---|---|---|
No contacts with that name found. | 18 ||||
24 | 25 | @contact.Name 26 | 27 | | 28 |29 | 30 | @contact.Email 31 | 32 | | 33 |34 | 35 | @contact.City 36 | 37 | | 38 |39 | 40 | @contact.Phone 41 | 42 | | 43 |
This is a demo on how to use Minimal APIs + Razor Components + HTMX to create dynamic server side rendered apps.
11 | Explore the crud example 12 |13 | You can check out the repo here 14 |
15 |16 | Using Minimal APIs and Razor components is possible because of a new class in .NET 8: RazorComponentResult 17 |
18 |This returns an IResult after initializing a Razor component, making it possible to use Razor components in Minimal APIs.
19 |23 | Requires .NET 8 RC1 installed. 24 |
25 |29 | The HTMX attribute hx-boost turns internal links into ajax calls. This speeds up site speed since there are no full page reloads. You can opt in and out of this behavior on a link by link basis. 30 |
31 |32 | This app uses hx-boost on the body tag, turning on this functionality for all links. 33 |
34 |38 | The HTMX attributes hx-get and hx-post sets up ajax calls to endpoints and swaps html on the page with what was returned. 39 |
40 |41 | This is useful for submitting forms, searching tables, and modifying the dom from a user interaction on the page. 42 |
43 |47 | The HTMX attribute hx-trigger can be used to poll the server. This can setup ajax calls to endpoints at an interval and swap html on the page with what was returned. 48 |
49 |50 | Below is random number generator. 51 |
52 |58 | HTMX calls /random-number every 2s and replaces the html with the html returned by the endpoint. 59 |
60 |John Doe
23 |