Passing multiple props
Answered
WhyFencePost (Ping Reply) posted this in #help-forum
I know that this is probably so simple, but how do i pass additional data to my function?
thats the part that i have rn, which takes the content (the page), and i also need to pass name, type, loginstate, and image to this, and idk how.
function MobileMenu({
content,
}: Readonly<{
content: React.ReactNode;
}>){thats the part that i have rn, which takes the content (the page), and i also need to pass name, type, loginstate, and image to this, and idk how.
Answered by Anay-208
function MobileMenu({
content,
anotherVar,
yesAnotherVar
}: Readonly<{
content: React.ReactNode;
anotherVar: any;
yesAnotherVar: any;
}>){3 Replies
@WhyFencePost (Ping Reply) I know that this is probably so simple, but how do i pass additional data to my function?
tsx
function MobileMenu({
content,
}: Readonly<{
content: React.ReactNode;
}>){
thats the part that i have rn, which takes the content (the page), and i also need to pass name, type, loginstate, and image to this, and idk how.
function MobileMenu({
content,
anotherVar,
yesAnotherVar
}: Readonly<{
content: React.ReactNode;
anotherVar: any;
yesAnotherVar: any;
}>){Answer
thanks
i got it to work