Skip to content

rmjoia/Blazor-WebApp-JS-Interop-Example-SSR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlazorApp1

This project was created to demonstrate how to use JS interop on the new .Net 8 Blazor Web App project with Server side rendering.

Examples

The project contains two pages with examples of how to use JS interop, one using a js file and another using a ts file.

Why doing an example when documentation is available?

Well, because the documentation is not clear enough and the examples are not complete. I had to search a lot and try a lot and make loads of mistakes until I got it working.

JavaScript isolation in JavaScript modules

Load a script from an external JavaScript file (.js) collocated with a component

I ended up creating also an example with typescript, just to give it a go and see if it would work. And it did.

Colaboration

If you want to improve it and add more examples, feel free to do so. I will be happy to accept pull requests.

About

Blazor WebApp JS Interop Example using SSR

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published