Blazor JavaScript Interop (Easy How To)
HTML-код
- Опубликовано: 5 окт 2024
- Adding JavaScript to a Blazor project.
Code Repo: github.com/Cod...
Movie Site: cf-blazormovie...
-----------------------------------------------------------------
👨🏫 Self-Paced .NET Bootcamp Course (Includes FREE courses)
learn.coderfou...
🙌 Support the channel and become a channel member
/ @coderfoundry
📖 Buy the Book: Breaking the Code
geni.us/breaki...
👕 Grab some CF merch
teespring.com/...
🗣 Join us on Discord
/ discord
👓 Buy the blue light blocking glasses we use at CF. Pixel Eyewear Glasses ($5 off with coupon code CODERFOUNDRY)
www.pixeleyewe...
💻 How to get your first coding job
coderfoundry.co...
🎥 The equipment we use at Coder Foundry
kit.co/CoderFo...
DISCLAIMER: This video and description may contain affiliate links, which means that if you click on one of the product links, we’ll receive a small commission. This helps support the channel and allows us to continue to make videos like this. Thank you for your support!
Wow, I started developing 1.5 years ago and guys like you boost my progress so much, thx for your effort.🔥
Great to hear!
Thanks for this. Blazor Js interop has always been a bit confusing until this video dropped. Thanks again
Glad to help!
Now this is how you explain stuff !!
Thanks much!!
Glad to help!
This is an awesome tutorial! Easy explanation with a great example 🙌!
Glad it was helpful!
Very well done.
Great Video thanks
I feel like I've done exactly the same as you, but I'm getting an error in the browser that "'myFunction' was undefined".
Blazor is powerful .
It really is.
Does Microsoft ever plan on creating a synchronous version using js interop?
very good, god gamer. This is the new meta
I'm having so much trouble exporting a js class. I can import the isolated JS no problem, but it can't find any of the class members...
Having the exact same problem right now. The only way I’ve been able to get around it is by creating a separate function that returns an instance of that class and calling it from my razor components. Microsoft also has an example assigning a class with static methods to the window but that doesn’t seem to work for instantiations.
@@zaspalia that is *exactly* how I’ve been working around it. Weird.
Hi dear, Can you do portfolio reviews live stream, ve been waiting for so long .. :((
Do you think building CRM is also as effective as Bug Tracker?
I think it works well
Hi, thanks for this. However, I find it difficult to work with existing javascript libraries. Do you have a video on how to work with external javascript libraries?
Which one?
Im looking to better understand the same. I'm doing a comparison of charting libraries such as Highcharts and Apache Echarts. There's likely something out there for Blazor already, given the popularity of those libraries.
A video on going from JS to an Interop version for Blazor would be neat to see.
How to make this app without Javascript?
Can a .net 8 web mvc project with jquery be updated to also use blazor ?
It's a rewrite. The architecture is different.
is it possible to interop blazor with three js to upload/import a 3d obj file from blender that has animations?
Maybe. I would have to try.
Does it not work with client components? The ones that uses [InteractiveAuto] specifically. It finds the js function from server components but gives an error saying something like "function not defined" when calling from client components that use [InteractiveAuto]
Interactive auto means the component can execute on the server and dom updates via siqnalr. It can also execute via wasm which executes on the client which uses interop.
Is it possible to implement this code in blazor ssr ??
I'll try
Hi, does this also work with blazor server?
It most cases. You cannot modify the dom with js because it clashes with blazor.
Wow ,amaizing ,thank so much
I'm glad it helped.
@@CoderFoundry Can you give me a website link so I can design icons like yours?
thank you
You're welcome
16:50 ah yes
Coding in impossible edge caes because "You never know"
This is just future proofing. Yes it's objectively impossible right now that that would be null. But what about a few months from now when "John Doe" makes some edits to this code?
You literally never know
Best Tutorial thanks!
Glad it helped!