very nice video Akin!! Today with server actions, do you think we can bypass api routes? Is one better than the other in terms of efficiency? And the second, in mongoose, where do you set the collection name(test/users) that shows in mongo Atlas?
Thanks for watching the video. To answer your question, you have to think about it in a different perspective. Using server actions can help make programing applications a bit more efficient as the server actions can be called within server and client components. With api routes, the user is able to set up an external JSON api configuration which in turn allows the user to connect the client side with an external source such as a database etc if that makes sense. So, it's not necessarily bypassing the api routes, you have to view it through the lens of what the application needs, if I need to connect my application to an external database such as MongoDB or AWS S3 an api route will be more sufficient as that route can be linked to my client component. But, if I need to fetch data from an internal/external route, I can simply use server actions to pull that data directly. To set the name of your collections, you would need to do so when setting up your MongoDB Schema and also, the collection name in MongoDB is usually given if the name is not set. Hope this helps clarify your questions. If not, feel free to ask away. Be sure to check out the latest video on AWS S3 Buckets.
Half way through the video and already learned a lot brother. You are good at teaching, very calm and clear. Appreciate the effort you put in!
Thanks so much. You really just made my day. Hopefully you enjoy the other videos.
At last something comprehensive and UP TO DATE for begginers. Many thanks!!!
Thanks! Glad you liked it!
Thanks for the video, Now my concept is clear.❤
Thanks. Appreciate it.
Nice Vidéo
Thankx
very nice video Akin!! Today with server actions, do you think we can bypass api routes? Is one better than the other in terms of efficiency? And the second, in mongoose, where do you set the collection name(test/users) that shows in mongo Atlas?
Thanks for watching the video. To answer your question, you have to think about it in a different perspective. Using server actions can help make programing applications a bit more efficient as the server actions can be called within server and client components. With api routes, the user is able to set up an external JSON api configuration which in turn allows the user to connect the client side with an external source such as a database etc if that makes sense. So, it's not necessarily bypassing the api routes, you have to view it through the lens of what the application needs, if I need to connect my application to an external database such as MongoDB or AWS S3 an api route will be more sufficient as that route can be linked to my client component. But, if I need to fetch data from an internal/external route, I can simply use server actions to pull that data directly. To set the name of your collections, you would need to do so when setting up your MongoDB Schema and also, the collection name in MongoDB is usually given if the name is not set. Hope this helps clarify your questions. If not, feel free to ask away. Be sure to check out the latest video on AWS S3 Buckets.
Can you give sourse code
Sure, once im done with updating it. I'll post the source code.