DEV Community

Cover image for crud in mern stack

crud in mern stack

Muhammed Shamal PV on July 06, 2024

Follow me on LinkedIn Follow me on Github.com Click & Read skipping boaring section 😁 recommend for beginners; 1. Setting Up the ...
Collapse
 
ihssmaheel profile image
Mohamed Ismail • • Edited

Liquid syntax error: 'raw' tag was never closed

Collapse
 
muhammedshamal profile image
Muhammed Shamal PV •

Ya, I'll next time bro

Collapse
 
muhammedshamal profile image
Muhammed Shamal PV •

I'll try to do more better next time

Collapse
 
labeedadar profile image
Labeed Ahmad •

Image description any solutions?

Collapse
 
somapti_nahar_2732eafaed6 profile image
Somapti Nahar •

use optional channing or null check
{todos?.map(todo => (
key={todo._id}
todo={todo}
updateTodo={updateTodo}
deleteTodo={deleteTodo}
/>
))}

Collapse
 
muhammedshamal profile image
Muhammed Shamal PV •

I think you where wrongly type your code!

here the correct :

{todos?.map(todo => (
key={todo._id}
todo={todo}
updateTodo={updateTodo}
deleteTodo={deleteTodo}
/>
))}

Collapse
 
muhammedshamal profile image
Muhammed Shamal PV •

use && before using this map.
(for only make mapping if it availble)

eg: let x = [1,2,3,4];

{x && x.map((val,index)=><div>{val}</div>)}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
mateusguedess profile image
Mateus Guedes da Conceição •

you can use optional chaining, right?

{x?.map((val,index)=><div>{val}</div>)}

Thread Thread
 
muhammedshamal profile image
Muhammed Shamal PV •

again a good option bro

Collapse
 
mohammed_quintel_08e46bc3 profile image
mohammed quintel •

it simple, thanks

Collapse
 
muhammedshamal profile image
Muhammed Shamal PV •

your welcome bro

Collapse
 
benjamin_peikes profile image
Benjamin Peikes •

I thought create-react-app was no longer used?

Collapse
 
joel_nada profile image
Joel Nada •

It's there but ur choice to use bro, I think you know vite, vite is best to use.

Collapse
 
frank_alimimian_1a2043cb5 profile image
Frank Alimimian •

nice explanation

Collapse
 
vsh_torch profile image
Vengatesh TR •

Great job. Thanks

Collapse
 
timilehin_abegunde_ec7afd profile image
Timilehin Abegunde •

Really helpful for me as a beginner in Backend development

Collapse
 
muhammedshamal profile image
Muhammed Shamal PV •

Ya bro

Collapse
 
cmanjima profile image
Manjima C •

Nice to Learn

Collapse
 
reversetrip profile image
hm hmm •

Wow, it's really concise:)