Here, you'll find a comprehensive collection of videos on everything related to the MERN (MongoDB, Express.js, React, and Node.js) stack. Whether you're just starting out or you're a seasoned developer, our tutorials cover a wide range of topics, from the basics of each technology to advanced techniques and best practices.
So, if you're ready to dive into the world of MERN stack development, subscribe to my channel.
Hello. when background message received I want to change a context state. but since background message listener is in the public folder I cannot do anything normally do in src folder. Is it available to do that?
when I run my app on port 3000 it successfully gets the FCM token but does not receives messages. then I ran my app on port 3001 and it works fine receives messages. but on other ports other than 3000 and 3001 it gives error. not even getting fcm token. ----------------------------- ERROR: "An error occurred while retrieving token. FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker for scope ('localhost:3006/firebase-cloud-messaging-push-scope') with script ('localhost:3006/firebase-messaging-sw.js'): The script has an unsupported MIME type ('text/html'). (messaging/failed-service-worker-registration)."----------------------------------
Hello Suman , you used 2 different type of syntax for arrow functions.arrow function as const a=()=>{some code} vs const a=()=>({some code}) .what is the difference. Later one make me confuse as we always use syntax as const a=()=>{some code}. in getItemStyle you have used this later syntax.Please help me out here on this concept , what I'm missing ?
If you didn't found yet, or anyone reading this in the future, Arrow Functions are unlike anonymous functions that can be written as normally with curly braces like this: () => { return "something" } but has to be written return keyword inside them, whereas it has one more short-hand syntax that is implicit returning a value (curly one is called explicit return as we're explicitly returning it) for example: () => ( "something" ) where any value will be returned implicitly by javascript itself, and if there're more than one statements then you can separate them by commas instead of semi colons and last one will be returned implicitly. For Example, if we write 3 statements and return a value from the arrow function, we can do it either in a normal way like this: () => { <statement1>, <statement2>, return "something" } or we can do a short hand like this: () => ( <statement1>, <statement2>, "something" ) In short, curly braces syntax needs a return keyword if we want to return a value, whereas round brackets doesn't needs return keyword, if you try to write it will throw Syntax Error. A function with curly braces syntax always returns undefined implicitly. Lastly, Arrow functions if have only one parameter defined like this: (p1) => ( "something" ) then this can be written really short like this: p1=>"something" , but for multiple statements or multiple params, you have to write like this: (p1,p2,p3)=>(<Statement1>, <Statement2>, "something") Hope you found this informative, if you've more doubts you can write me a mail for contact as I can't share my personal contacts or ids here😅 @gaggi.148@gmail.com
Try to use React & React-dom version 17 in your project to make this work, Tried and tested 👍if using React & React-dom version > 17 downgrade it to version 17.