Using Svelte Inside A React App; It's Easy!

Using Svelte Inside A React App; It's Easy!

Jack Herrington

1 год назад

20,403 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@lucasgiunta8874
@lucasgiunta8874 - 04.08.2023 13:44

Is react is rerender the svelte component at every change if those change happen inside of the Svelte component ? I have some data push by signalr. I tried to provide them to the svelte component from react, but it seems Svelte doesn't reconize the change of data event if the data has been change. Any idea what could be the issue ?

Ответить
@tririfandani1876
@tririfandani1876 - 06.07.2023 11:41

Amazing 🔥
Is it possible for "SolidJS in React" ?

Ответить
@diegotestdireco3494
@diegotestdireco3494 - 22.06.2023 03:30

Excellent. ¿If is possible to conbine with SSR and use the backend with in the api folder?

Ответить
@jasongallavin2917
@jasongallavin2917 - 15.06.2023 23:28

The while loop to remove the dom element seems like a really rough hack. If you want your props to change, you will need to pass those in the dependency array which will cause the component to remount every time. This sounds like a really big performance problem.

Ответить
@AzharUddin-ob7vb
@AzharUddin-ob7vb - 20.03.2023 18:38

Unbelievable jack
Very underated channel

Can you please create a video on how to write a code professionally

There is a React library called EUI (elastic UI)
It's overwhelming when I try to contribute

Ответить
@meyou118
@meyou118 - 19.03.2023 17:53

use astro

Ответить
@walkerneo
@walkerneo - 15.03.2023 21:35

Thanks for this Jack! I'd be interested in seeing how to add Svelte to an existing React + Webpack project as well if that's something you've explored. Seems the options are to either use the Svelte loader for Webpack, which I'd expect to be less stable than the Vite loader, or to convert the project to Vite. I'd tried that in the past but found that the overhead from the number of requests made using Vite actually negated any of the performance benefits as compared to Webpack

Ответить
@MikeLindsey001
@MikeLindsey001 - 05.03.2023 13:13

Hi Jack, first want to thank you for your generosity! I"m a winforms dev porting a huge application to web. Pretty much much all I know of js frameworks and libraries have come from your videos just in the last few weeks. You've made learning about these js technologies an absolute joy. This is probably not the best way to reach you and to pose a question but I'm wondering if it's possible and if you'd be interested to go the other way with this idea. That is to pull react into a svelte project? I ask because we'd like to use svelte as the starting point for our application but there are not many good UI tools currently available. I've been using the WinForms DevExpress UI tools for years. They also have a version of their tools written in react. I was hoping to build most of the UI in svelte and pull in the more complex react UI controls like their data grid and scheduler into the svelte project. I'm guessing this is a whole different challenge and not likely possible but wanted to be sure. Again, it blows me away with how much you do for the community ... and for free! You're an amazing person. I wish the best to you and your family!

Ответить
@ayushjain7023
@ayushjain7023 - 02.03.2023 22:26

react-svelte npm package did the same thing in 2018 only the code was written in class component, it's better here to use uselayouteffect here, thanks Jeff for amazing content 🎉

Ответить
@andreyrudin2286
@andreyrudin2286 - 25.02.2023 12:33

great! thanks a lot!

Ответить
@SoreBrain
@SoreBrain - 19.02.2023 14:10

Omg svelte content from Jack 😍

Ответить
@younesessaadani9303
@younesessaadani9303 - 12.02.2023 14:05

Man we appreciate what you share tysm sir ❤❤

Ответить
@clamhammer2463
@clamhammer2463 - 12.02.2023 02:18

Can we not just let React just die already?

Ответить
@rogerscript
@rogerscript - 11.02.2023 21:00

Whenever I think you can't amaze me more... you publish a new video and do it again XD

Ответить
@ivanc3176
@ivanc3176 - 11.02.2023 06:13

For the onClick you don't need to define 'export let onClick', svelte will still pick it up with only an 'on:click' on the div.

Ответить
@hendra5604
@hendra5604 - 10.02.2023 22:41

Hi Jack, it says "Unable To Accept Invite" when I tried to sign up your discord server

Ответить
@Kwuala
@Kwuala - 10.02.2023 16:17

Hello Jack ! Thanks for sharing this. It is very good to know that both libraries can work together without a great cost.

Ответить
@CFXTBogard
@CFXTBogard - 10.02.2023 02:51

Before I praise you with the content, what is that terminal?????

Ответить
@MattChinander
@MattChinander - 09.02.2023 22:02

In the end, it's all just Javascript!

Ответить
@d2vin
@d2vin - 09.02.2023 07:36

Can we do this with solid js?

Ответить
@MrBox4soumendu
@MrBox4soumendu - 09.02.2023 02:10

thank you sir but i decide to love leave u all 🥲🥲

Ответить
@mihaimanole2643
@mihaimanole2643 - 09.02.2023 00:33

useLayoutEffect hook is not necessary: Mount/Unmount event can be monitored with function ref. Instead of useRef can be used a useCallback(refTarget=>{if(refTarget!=null) mount() else unmount()})

Ответить
@TheKluVerKamp
@TheKluVerKamp - 09.02.2023 00:01

This is HUGE! Progressive enhancement for codebase migration from React to Svelte will be easy like this, love it!

Ответить
@SithLordBishop
@SithLordBishop - 08.02.2023 23:49

Svelte components in a react app works fine but if you try and do a full conversion over to full svelte you can have some performance issues when you leave and comeback to react pages etc. Iv run into this in the past when converting TO react from something else. Shared state store helps a lot for sure.

We are converting an app from angular and we looked at react but due to the above mentioned issues we decided to convert to svelete, among other reasons. Svelte works so well as components, partial pages and full pages dispersed in an app.

Ответить
@tanercoder1915
@tanercoder1915 - 08.02.2023 22:51

Loved your conclusion about inter-operatability between frameworks like react + swelte, and bringing other technologies into a project by pieces

Ответить
@rodolphobravo298
@rodolphobravo298 - 08.02.2023 06:45

Can we do it with Solid? 🤩

Ответить
@waleedsharif618
@waleedsharif618 - 08.02.2023 02:47

Do you think Svelte would replace React someday? Or not as long as meta is there then React will be updated all the time?

Ответить
@MrBox4soumendu
@MrBox4soumendu - 08.02.2023 01:50

Thank you 🎉😅

Ответить
@MrBox4soumendu
@MrBox4soumendu - 08.02.2023 01:36

HTML CSS is and 5g infrastructure

Ответить
@thatboyneedstherapy
@thatboyneedstherapy - 07.02.2023 23:54

What terminal font are you using?

Ответить
@tthiagolino8
@tthiagolino8 - 07.02.2023 18:29

Great video as always, please keep posting content about Svelte
I noticed a perhaps intentional lack of typescript in the project, I made a version of your project but adding typescript in my github
I used Nanostores instead of Zustand as it has better integration with Svelte /Thiagolino8/Svelte-in-React
There is also a library called svelte-adapter that allows you to use svelte components inside react or vue, accepting event-handlers and even reacting to changes of state coming from outside

Ответить
@oskrm
@oskrm - 07.02.2023 16:30

More Svelte please :D

Ответить
@dotjs5025
@dotjs5025 - 07.02.2023 11:55

Hey Jack . Cool one again ❤❤
. I am wondering if you had removed ‘readable’ from store.js could you have gotten rid off a bit more svelte code (May be you did remove it and I didn’t notice ?). Just wondering what the overall payload addition might be with all of svelte code

Ответить
@fkaspa
@fkaspa - 07.02.2023 11:22

We need your full course on Svelte really in depth!

Ответить
@amirmohammadsanji
@amirmohammadsanji - 07.02.2023 10:34

I love you you're always new

Ответить
@SenthuranElangovan
@SenthuranElangovan - 07.02.2023 07:13

Vue 😢

Ответить
@nishatsayyed8326
@nishatsayyed8326 - 07.02.2023 04:51

THIS IS WHY I SUBSCRIBED. This guy knows what he is doing and the content quality is what proves it. Thanks for teaching us Jack.
Would love to see if you would make something around Clean Architecture in React.

Ответить
@simonli8889
@simonli8889 - 07.02.2023 04:30

are you using pnpm now instead of npm/yarn?

Ответить
@shashikantmarskole
@shashikantmarskole - 07.02.2023 03:53

I learned a lot from your content—thank you for creating it! Keep up the good work.

Ответить
@juanzitelli
@juanzitelli - 07.02.2023 03:31

Awesome! Svelte and Vite rock!

Ответить
@ste-fa-no
@ste-fa-no - 07.02.2023 03:20

It seems like magic ✨ but it shows there's hours of research, study, trials and errors behind this.
Amazing content! Thank you! 🙌

Ответить
@codewithguillaume
@codewithguillaume - 07.02.2023 02:24

Dear Jack it’s always a pleasure to listen to you or watch your videos. Best!

Ответить
@teamaccount9320
@teamaccount9320 - 07.02.2023 01:40

So good

Ответить
@000TheMatheus000
@000TheMatheus000 - 07.02.2023 01:02

you mentioned solid. can you do the same thing but instead of svelte, use solidjs?

Ответить
@TheCodebookInc
@TheCodebookInc - 07.02.2023 00:59

I loved this video , love from The Codebook Inc. Can we do the same thing with vue and react?? What should be the best way to achieve it. If possible can you create a video on that too. Thanks a lot for this. I will do the research on my own

Ответить
@freespeech515
@freespeech515 - 07.02.2023 00:12

best framework is one have less boiler plate. Less in everything

Ответить
@freespeech515
@freespeech515 - 07.02.2023 00:11

Its all trash. i am checking out all these framework. Its all incomplete or complete mess.

Ответить
@fev4
@fev4 - 07.02.2023 00:03

This is the 'trojan horse' for Svelte to take over the world! Wuahahahah

Ответить
@mohamed_elmardi
@mohamed_elmardi - 06.02.2023 23:55

Would it be possible to do this without vite with NextJS?

Ответить
@IainSimmons
@IainSimmons - 06.02.2023 23:35

I loved this! I know many people don't understand why you would do this, but as someone who has had to maintain some large legacy React apps, it would be amazing to slowly migrate over to something a little more... svelte... component by component.

For those saying just switch over to Svelte entirely, that make not be an option if your components are tightly integrated with React-only UI frameworks, in which case, maybe something like Astro could be used to have both React and Svelte. But that depends a lot on the type of app or site being built.

Ответить