#React.Children expects a single React elements

1 messages · Page 1 of 1 (latest)

vague siren
#

identified one error:

#

Links should only have a single child.

#

So that p should go inside the div or outside of Link.

#

same here

sonic snow
#

Yaah yaah got it thankyou !!

#

i learn the hard way.. also found little many more. otw to fix em

vague siren
#

Learning to debug your own code is a huge part of learning to be a webdev.

sonic snow
#

if you find another one please lemme know

vague siren
#

Try to avoid copy pasting too many lines of code at once.

#

Make sure you get it working first, push the minimum number of new lines, revert if they break.

#

If you push too many new lines at once, there's no way to debug even for seasoned devs.

#

Learn to walk before you run.

sonic snow
#

note down all advices on my copy

vague siren
#

Dev gives you more debug information than in next build, this is how I figured out what to look for:

sonic snow
#

i fix em all

#

now onto this one

vague siren
#

edit your next.config.js file and add in dev.to as an image domain.

sonic snow
#

i did that too but my question is what if i got to many different sources of images

vague siren
sonic snow
#

i had to add all ??

vague siren
#

Yep, the alternative is don't use next/image

#

and just use <img src= instead

sonic snow
#

tell me to use next/image

vague siren
#

mmm, I'm pretty sure <img src should still work? I haven't work with next recently.

#

If it doesn't, ask for help in a new thread on #1007476603422527558 someone else will come along to help.

sonic snow
#

no before 2 hours ago i use img and the vercel throw build fail error when i push my code and when i figure out it was saying me to use next/iimg

vague siren
sonic snow
#

putting two ** in hostname didn't work

#

module.exports = {
nextConfig,
images: {
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
},
};

sonic snow
#

i can add domains but that will not be good practice

#

bro whats going on ... js module.exports = { nextConfig, images: { remotePatterns: [ { protocol: "https", hostname: "dev.to", }, { protocol: "https", hostname: "cdn.tailgrids.com", }, { protocol: "https", hostname: "res.cloudinary.com", }, ], }, };

#

i put all possible domains showing in console..stil not working

vague siren
#

😦 I don't like this next change.

sonic snow
#

crying !!!

vague siren
#

Yeah, you'll want to open a new #1007476603422527558 thread to get some assistance for this. "Next/image any domain" would be a good title.

sonic snow
#

btw thankyou so much for help. God bless you !! stay succeed

sonic snow
#

heyyy bro you were righttttt

#

i duuno what happened on first build but i use simple img tag and it work

#

finally console cleared and the app is working fine everywhere !!

#

fk the bug was so small and i messed it up all took hours to solve.

#

tysm !! i'm outtt