beroer
beroer
Explore posts from servers
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
but if you meant yourself for a rubber duck, you're at least one that's sitting on its own brains-level rubber duck! i really appreciate all the brains.
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
i feel like you made me zoom out and see more. 😄
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
all right. i just 'figured' Portals 'out' on the go once, and kept using it like that ever since, i wasn't aware of all these different ways to structure it or what could lead to what when used like, thanks for the update. 😄 i'll still need to try hard to warp my head around this.
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
you mean like, within HamburgerMenu:
return showHamburgerMenu && <Portal>
... {/*HamburgerMenu markup*/}
</Portal>
return showHamburgerMenu && <Portal>
... {/*HamburgerMenu markup*/}
</Portal>
?
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
but if the hamburgermenu would be a top-level component, in the page... its visibility could still be modified from within itself by the zustand store, right? so i wouldn't have to make my whole page a client component.
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
oh great, thanks for the explanation
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
since zustand is global state, and i had the HamburgerMenu instanced 2 times, once in NavBarMobile and once in NavBar, but using the same global zustand flag, once that flag flipped by either trigger, it instanced HamburgerMenu twice, right?
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
i made a step forward but it's still a bit hazy, i'm trying to follow.
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
yes
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
oh i think the point is that it doesn't matter from WHERE it's coming from the point is WHERE IT'S GOING TO
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
yes
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
from NavBarMobile
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
instead of removing the line i commented it out.
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
wow i removed it and indeed there's only one now. i'm having a hard time understanding how come it still pops out from NavBarMobile even though it's commented out.
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
so using local state would be one option
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
i see
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
so what could i do to have only one?
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
even though in tablet view (when NavBar applies) (from sm:+) the hamburger button is on the top of the viewport (next to the search) and in mobile view (when NavBarMobile applies) it's on the bottom of the viewport?
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
if https://thrifty-seven.vercel.app is blank, try https://thrifty-seven.vercel.app/en/women if you wanna see the live version
73 replies
TTCTheo's Typesafe Cult
Created by beroer on 5/3/2024 in #questions
React Portal renders the element passed as children 2 times
as far as i can tell, yes. i've checked the two Portals in: NavBarMobile and both got doubled. didn't check others.
73 replies