49 Replies
how to prevent it guys ?
That just looks like your passing props?
Prop drilling is when you have one component pass it a prop, its got a child you pass it the same prop, then its got a child component too and you pass it the same prop
hence "drilling"
so if three times its called prop drilling ?
I mean even 2 times is
but one time is just passing a prop xD
i heard that passing that statesetter through a prop it self a prop drilling
App > Title > Welcome = all got prop
hello
from App that would be drillingoh ok
App passes to Title > drills to Welcome
if that makes sense xD
so what am i doing is it good to do ?
I mean I don't use React so probably not best to say if that code is good or not >.>;;
but yes just passing props is a normal thing
drilling is rather normal practice too if not using global store
heard that its a bad practice
best and bad practices are a lie
more like guidelines you figure out whats best/bad for your situation.
okay
I think its bad in React if you are going too deep you should probably question how you are doing things xD
like 2 or 3 🤷♂️ ... 5 or 6... yea probably not good
ig i would just use something like a link or useNavigate or something
Your only other option in React is to use Context API or redux ?
will that be fine ?
idk again thats React land, I don't dabble with it
Svelte(Kit) I'm leveraging how the browser works and not having to think about half that crap so
and it has Stores ❤️
react vs svelte which is better ? i am a beginner
I'm biased so ... Svelte is much easier and nice output xD
but you will hear the bs like "react if you want a job" blah blah
what you started with ?
Svelte is becoming more popular and will shift the JS world over time, its already adopted by some big players and Vercels got Rich on payroll just to work full time on it so that is a pretty big bet being they own NextJS fully
I pretty much started with Svelte xD (but I do look at how others do things a little)
I chose it knowing what I wanted from a UI framework though 😉
i just heard it is what ppl are using cuz they say it a standard and has a lot of community and libgs
i mean react
so i started using it
Reacts the popular one yup 😄
i have seen svelte
also a PITA lol
looks like astro
Astro took lots of inspiration from SvelteKit as Fred worked with the team when he was doing Snowpack. Then Kit ditched snowpack for Vite and Fred made Astro 😄 (and also ended up switching to Vite from snowpack with Astro hehe)
Also html template languages so
none that JSX garbo
vite is fast man
like zuuuuuuuuuuuuuuuum
Yea snowpack was legit but even Fred succeeded to Vite xD
We would not have Astro or Kit for what it is without Vite heh
i know webpack ( crm ) never heard of snow pack
both are Vite plugins basically (well Kit is now they fully abstracted it, so it plays nice with other Vite plugins)
Fred Scott the author of Astro made snowpack and skypack
It was really nice too pretty much the same idea as Vite, but Evan You is just a mad lad and knocked it out the park lol
It was actually better in some ways cause Vite only did single entry points and snowpack would look for any (so worked well with other template langs)
thats a story man, where you heard it ?
I pay attention lol
I've been using SvelteKit since its birth and the rest of the tools around it
oh
I adopted Snowpack when they did and Fred was helping with it (pre Astro days)
and watched all that go down as it happened 🤣
have a lot of time using just svelte ha ? you use it at your job ?
11ty scene too cause its neat...
lots of time ya, kinda I freelance but only ahve had the chance to use it in one website so far.
but yea /end long rant
i tried hugo they say its fast but not a lot of flexibility
way off topic lol
you said 11ty its a ssg
i am using astro now
Know though the idea of Prop drilling is not just React so concept is the same for them all
11ty is a ssg yea
only a SSG though no SSR like Astro
ohh
Astro is becoming even more like SvelteKit soon too they just released the Client side router for it
#transitionalApps
So you can have the best of all worlds ❤️
hmm didnt understand much but astro i will use it
back on topic though, what you want with React is to look up Prop Drilling vs Context API
find all the spicy debates about it and make up your own choice if you see a perf issue
or have issues with the abstractions getting out of hand.
i need to use context api someday
probably idk people also speak up against using it xD
freaking React mang..
🤣
then what do i have use man hehehehe
i heard that too
man react heheheh
lets see
i am giving the time to do its thing
where it says me just leave it then ill do it