<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: PRANKUR PANDEY</title>
    <description>The latest articles on DEV Community by PRANKUR PANDEY (@prankurpandeyy).</description>
    <link>https://dev.to/prankurpandeyy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F199782%2F42c7bef8-2864-41cd-9ded-00b40b9b7f98.png</url>
      <title>DEV Community: PRANKUR PANDEY</title>
      <link>https://dev.to/prankurpandeyy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prankurpandeyy"/>
    <language>en</language>
    <item>
      <title>How to Build a Portfolio Website Using Figma and AI Tools</title>
      <dc:creator>PRANKUR PANDEY</dc:creator>
      <pubDate>Tue, 18 Nov 2025 10:41:15 +0000</pubDate>
      <link>https://dev.to/prankurpandeyy/how-to-build-a-portfolio-website-using-figma-and-ai-tools-5c97</link>
      <guid>https://dev.to/prankurpandeyy/how-to-build-a-portfolio-website-using-figma-and-ai-tools-5c97</guid>
      <description>&lt;p&gt;Ever since my article on &lt;a href="https://www.freecodecamp.org/news/become-a-full-stack-developer-and-get-a-job/" rel="noopener noreferrer"&gt;How to Become a Full Stack Developer and Get a Job in 2025&lt;/a&gt; went viral, I’ve received countless DMs, emails, and even WhatsApp messages from readers. People have been asking about everything from learning to code and mastering system design to web design and how AI fits into modern development.&lt;/p&gt;

&lt;p&gt;I’ve been taking it one topic at a time. My last piece on system design principles received great feedback, and that encouragement has kept me going.&lt;/p&gt;

&lt;p&gt;Lately, I’ve developed a deep interest in UI/UX design – not just out of curiosity, but because so many readers have been requesting a detailed guide. They want one that explains how to learn web design, how to apply it to real-world projects, and how AI is reshaping the field.&lt;/p&gt;

&lt;p&gt;Looking back, my journey started six years ago as a software tester. From there, I transitioned into full-stack development, then DevOps. I also explored data analysis, and today I manage a full-time freelancing career alongside my farming work.&lt;/p&gt;

&lt;p&gt;One thing I’ve learned along the way is that a strong portfolio can take you to places you’d never imagined.&lt;/p&gt;

&lt;p&gt;I’ve had a portfolio for years, but now I’m completely rebuilding it from scratch to make it cleaner, smarter, and more reflective of who I’ve become as a developer.&lt;/p&gt;

&lt;p&gt;In this tutorial, I’ll walk you through how I created my new portfolio and show you how you can build yours too – with the right structure, design, and a touch of copywriting magic to make it stand out.&lt;/p&gt;

&lt;h3&gt;
  
  
  What We’ll Cover:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;What is a Portfolio Website and Why Do You Need One?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Important Portfolio Website Components&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to Make Your Portfolio Website Stand Out&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to use Figma to Design Your Own Portfolio&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tools for Figma to Code Generation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copywriting for Your Portfolio&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testing Benchmarks for a Portfolio Website&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hosting Your Portfolio&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to Use Your Portfolio Effectively&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Q&amp;amp;A&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Final Notes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conclusion&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is a Portfolio Website and Why Do You Need One?
&lt;/h2&gt;

&lt;p&gt;A portfolio website is your own space on the internet where you can proudly show your best work, projects, and achievements. Think of it as your digital résumé, but far more visual and personal. Instead of just listing your skills or job titles, it lets people actually see what you’ve built, designed, or created, and this tells your story better than any document can.&lt;/p&gt;

&lt;p&gt;It helps employers, clients, or collaborators understand your skills, experience, and creativity at a glance. While it’s beneficial for designers, developers, writers, and photographers, anyone who wants to share their work online can create one, from students and freelancers to business professionals.&lt;/p&gt;

&lt;p&gt;Here’s why having a portfolio website matters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A collection of your best work:&lt;/strong&gt; like a gallery where you keep your most impressive projects, artwork, or achievements all in one place.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Your online identity:&lt;/strong&gt; It’s your personal brand, showing who you are, what you do, and what makes your work stand out.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A way to showcase your skills:&lt;/strong&gt; Through images, videos, and live demos, it give people a clear picture of your talent and creativity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;An open door for opportunities:&lt;/strong&gt; People can visit your site, explore your work, and contact you directly for jobs, collaborations, or freelance work.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A tool for career growth:&lt;/strong&gt; A well-built portfolio helps you attract clients, get noticed by employers, and open doors to new partnerships.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In simple words, your portfolio website is your professional story told visually – a mix of your work, passion, and personality that helps the world see what you’re capable of.&lt;/p&gt;

&lt;h2&gt;
  
  
  Important Portfolio Website Components
&lt;/h2&gt;

&lt;p&gt;Now that we know why a portfolio website matters, let’s look at the key components that make it stand out. Each part plays a role in showing who you are, what you can do, and how you can help others.&lt;/p&gt;

&lt;p&gt;Since I’m a developer, and the people who have reached out to me are mostly tech enthusiasts, here I’ll give a technical portfolio example. But you can apply the learnings from this guide to build any type of portfolio for any niche/business.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Home Page: The First Impression
&lt;/h3&gt;

&lt;p&gt;Your homepage is like the front door to your digital world. It should quickly tell visitors who you are, what you do, and why you’re worth hiring or collaborating with. Keep it clean, simple, and welcoming: just a few strong lines about your skills and what kind of projects you work on.&lt;/p&gt;

&lt;p&gt;Tip: Use a short headline like “Hi, I’m Prankur – I build fast, user-friendly web apps.”&lt;/p&gt;

&lt;h3&gt;
  
  
  2. About Section: Your Story
&lt;/h3&gt;

&lt;p&gt;This is where you make your connection with the audience. Share your journey: how you started, what drives you, and what kind of problems you love solving. Keep it conversational and honest. People love working with real humans, not buzzwords.&lt;/p&gt;

&lt;p&gt;Tip: Add a professional but friendly photo (optional) here to make it more personal.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Projects / Work Section: Show, Don’t Just Tell
&lt;/h3&gt;

&lt;p&gt;This is the heart of your portfolio. List your best projects – the ones that represent your strongest skills and the kind of work you want to keep doing. Each project should include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A short description of what it is.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The tools or technologies you used.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The challenge you solved.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A screenshot or live demo link.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GitHub link so that people can see how you code&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tip: 3–6 strong projects are better than 15 average ones. If you’re actively contributing to open source, you should add that to your portfolio, too.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Case Studies: Tell the Story Behind the Work
&lt;/h3&gt;

&lt;p&gt;Case studies take your projects one step further. They explain your thinking process and how you understood the client’s problem, what steps you took, and what results you achieved. This helps potential employers or clients see your problem-solving skills, not just your designs or code.&lt;/p&gt;

&lt;p&gt;Tip: Keep it short and focus on the “before → after” transformation.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Skills &amp;amp; Tools Section
&lt;/h3&gt;

&lt;p&gt;List your key technical and creative skills, like HTML, CSS, JavaScript, React, Figma, or AI.&lt;br&gt;&lt;br&gt;
You can group them as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Frontend Tools&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Backend Tools&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Design Tools&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AI or Productivity Tools&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tip: Keep the list focused and highlight the tools you actually use, not every tool you’ve ever tried.&lt;/p&gt;
&lt;h3&gt;
  
  
  6. Testimonials: Social Proof (Optional)
&lt;/h3&gt;

&lt;p&gt;People trust people. Include a few quotes or short testimonials from clients, teammates, or mentors who can vouch for your skills and professionalism. It instantly builds trust and credibility.&lt;/p&gt;

&lt;p&gt;If you are just starting, you can add this section later on, as initially you won’t have testimonials. Once you start working, you can politely ask your clients to give their feedback on your work. Just make sure to get their permission to add it to your site.&lt;/p&gt;

&lt;p&gt;Tip: Ask for a 2–3 sentence testimonial right after finishing a project.&lt;/p&gt;
&lt;h3&gt;
  
  
  7. Blog or Articles Section (Optional)
&lt;/h3&gt;

&lt;p&gt;If you write tutorials or share knowledge, add a blog section. It helps you stand out as someone who not only builds but also teaches and communicates ideas clearly. It also boosts SEO and keeps your site fresh.&lt;/p&gt;

&lt;p&gt;Tip: Even 2–3 strong, educational articles can make a huge difference.&lt;/p&gt;
&lt;h3&gt;
  
  
  8. Contact Section: Make It Easy to Reach You
&lt;/h3&gt;

&lt;p&gt;Your contact page should be simple, visible, and welcoming. Include your email, social links (LinkedIn, GitHub, X/Twitter), and maybe a contact form. You can also add a small call to action like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Have a project in mind? Let’s connect.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Tip: Place your contact link in the main menu. Don’t hide it.&lt;/p&gt;
&lt;h3&gt;
  
  
  9. Résumé / Downloadable CV (Optional)
&lt;/h3&gt;

&lt;p&gt;If you’re job-hunting, include a link to download your latest résumé. You can also add a “quick summary” of your experience, education, and certifications directly on the website.&lt;/p&gt;
&lt;h3&gt;
  
  
  10. Call to Action (CTA)
&lt;/h3&gt;

&lt;p&gt;Every great portfolio ends with a nudge – a simple next step for your visitor. It could be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;“Let’s build something amazing together.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“Hire me for your next project.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“Check out my latest work.”&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A clear CTA can help turn a visitor into a lead or follower.&lt;/p&gt;

&lt;p&gt;Your portfolio is not just a gallery. It’s a storytelling tool. It tells the world what you can do, how you think, and what makes you unique. Make sure every section serves a purpose, looks clean, and reflects your real personality.&lt;/p&gt;
&lt;h2&gt;
  
  
  How to Make Your Portfolio Website Stand Out
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Showcase Your Best Work&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Only include your strongest and most relevant projects. Quality matters more than quantity. A few great examples of your work will create a much better impression than a long list of average ones.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Use High-Quality Images and Videos&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Make sure your work looks clear and professional. Good visuals instantly catch attention and show that you care about presentation. Use clean screenshots, mockups, or short demo videos.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Write Clearly and Keep It Short&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Explain your work and skills in simple, easy-to-read language. Avoid long paragraphs — most visitors just skim. A few lines that get straight to the point are enough.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Tell Your Story&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Use your “About Me” section to share your journey — how you started, what you love building, and what kind of work you enjoy most. People connect more with stories than with just titles or resumes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Keep Navigation Simple&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Make sure visitors can easily find your projects, contact info, and other key details. A clean menu and clear layout help people focus on your work instead of figuring out where to click.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Keep It Updated&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Whenever you finish a new project or learn a new skill, add it to your portfolio. An up-to-date portfolio shows that you’re active, learning, and growing in your field.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Optimise for SEO&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Use the right keywords — the ones people might type when searching for your kind of work (like “frontend developer” or “Figma to code expert”). This helps your site appear in search results. Many AI-powered website builders can assist with basic SEO setup.&lt;/p&gt;
&lt;h2&gt;
  
  
  How to Use Figma to Design Your Own Portfolio
&lt;/h2&gt;

&lt;p&gt;Designing your own portfolio might sound intimidating at first, but tools like &lt;strong&gt;Figma&lt;/strong&gt; make the process surprisingly intuitive – even if you’re not a professional designer. With Figma, you can visually plan every section of your portfolio before turning it into a live website.&lt;/p&gt;

&lt;p&gt;I’ve been learning web design and using Figma for a long time for my client projects. But here, I didn’t build the entire portfolio from scratch. I used Figma’s design inspiration library to get some ideas, and I built the portfolio based on that.&lt;/p&gt;

&lt;p&gt;Let’s walk through how you can do that, step by step, using the layout shown below as an example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1d2i9mlobks9tdt2oiwa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1d2i9mlobks9tdt2oiwa.png" alt="example-portfolio" width="800" height="1889"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Start With a Wireframe
&lt;/h3&gt;

&lt;p&gt;Before adding colours or fancy visuals, begin with a simple wireframe. It’s basically a rough sketch of your portfolio layout.&lt;/p&gt;

&lt;p&gt;In Figma, you can create frames for each section you want on your site:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Hero section (your name, title, and call-to-action buttons)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“What I Do Best” or skills&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tech stack&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Featured projects&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Blog or article previews&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Services and pricing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Contact form&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This helps you get the structure right before focusing on design. Don’t worry about fonts or images yet – just boxes and text placeholders are enough.&lt;/p&gt;

&lt;p&gt;Here’s a sample wireframe I created to visualise how everything should look before moving into Figma. It’s always a good idea to sketch or plan your design on paper first, as it helps you get a clear picture of the layout and refine details like colours, fonts, and spacing early on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jgcq6ckttb5vp7o81t8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jgcq6ckttb5vp7o81t8.png" alt="wireframe-figma" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the wireframe is ready, you can start adding your preferred colours, typography, and images to bring the design to life. If you want to go a step further and understand how to choose the right colour palettes and fonts, it’s worth exploring &lt;strong&gt;design psychology&lt;/strong&gt; — it plays a huge role in how people perceive your work.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Add Visual Hierarchy and Colour
&lt;/h3&gt;

&lt;p&gt;Once your structure feels solid, start adding typography and colour to create a visual hierarchy. This helps the viewer’s eyes know where to focus first.&lt;/p&gt;

&lt;p&gt;For example, in the sample design above, the &lt;strong&gt;hero section&lt;/strong&gt; (at the top) instantly grabs attention with bold typography (“I build things for the web”) and a subtle background/hero image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa681nlmo6k2pzlgabk3x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa681nlmo6k2pzlgabk3x.png" alt="visual-hierachy-and-color-figma" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Use Figma’s colour styles to define a consistent palette. Try using about 3 to 4 shades that complement each other. Keep it minimal and professional. For text, you can choose neutral fonts like Poppins, Inter, or Roboto, which look great on both dark and light themes.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Create Components for Reuse
&lt;/h3&gt;

&lt;p&gt;Figma allows you to turn recurring UI elements like buttons, cards, and tags into components. In the portfolio example here, notice how every project card, article preview, and pricing box follows the same layout. By creating a single card component and reusing it, you can easily maintain consistency and update everything in one go later.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbxf5o4rrh9a1w9jephwg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbxf5o4rrh9a1w9jephwg.png" alt="components-reuse-figma" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this design, I will be using a blog featuring component multiple times, so instead of designing it again and again, I have made it once, and I am now using it multiple times.&lt;/p&gt;
&lt;h3&gt;
  
  
  4. Add Your Content and Images
&lt;/h3&gt;

&lt;p&gt;Now that your base design is ready, it’s time to make it personal. You can go ahead and replace placeholders with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Your best project screenshots (use mockups if needed),&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Professional headshot or relevant visuals,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Real content, like your bio, skills, and service details.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Make sure you keep the spacing clean. It ensures all sections stay neatly aligned, even when you adjust or add new elements later.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa681nlmo6k2pzlgabk3x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa681nlmo6k2pzlgabk3x.png" alt="add-your-content-figma" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this hero section, I have used my name and colour and font of my choice on the left, and you can see the &lt;strong&gt;Styles&lt;/strong&gt; showing all the colours I have used across the project.&lt;/p&gt;
&lt;h3&gt;
  
  
  5. Create Interactive Prototypes
&lt;/h3&gt;

&lt;p&gt;Before exporting your design, use Figma’s &lt;strong&gt;Prototype Mode&lt;/strong&gt; to link different pages together – for example, make “Projects” in the top navigation scroll smoothly to your project section. This gives you a working demo to test how users will experience your portfolio before you even write a single line of code.&lt;/p&gt;

&lt;p&gt;You can also share this prototype with friends or mentors for quick feedback.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftqvncmb4u0jvf5feefx3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftqvncmb4u0jvf5feefx3.png" alt="create-interactive-prototype-figma" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  6. Export or Hand Off for Development
&lt;/h3&gt;

&lt;p&gt;After testing your design in Prototype Mode when you’re satisfied, the final step is the &lt;strong&gt;handoff&lt;/strong&gt;. Use the Export panel to download all required assets (icons, logos, images) in their correct formats. Then share the Figma file and go to &lt;strong&gt;Dev Mode&lt;/strong&gt;, where you can inspect typography, spacing, sizes, and colour values. These exported assets and inspected specs are what developers use to create the live HTML/CSS code.&lt;/p&gt;

&lt;p&gt;Note: The Dev Mode in Figma allows you to inspect CSS and export your stuff easily. Since I don’t have a paid Figma plan, I can’t show inspecting and exporting.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fab2vgu1ovhvsuv8gzdf7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fab2vgu1ovhvsuv8gzdf7.png" alt="figma-handoff" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Designing your portfolio in Figma gives you full freedom over layout, colour choices, and how you present your personality. Keep it simple, prioritise usability, and design with clarity. Once the layout is complete and tested, converting it into a functional site becomes straightforward.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F73cz36d2r2zko45b2xzv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F73cz36d2r2zko45b2xzv.png" alt="figma-auto-layout" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also use auto layout just by right-clicking on the design section components.&lt;/p&gt;

&lt;p&gt;Auto Layout allows designers to define rules for spacing, direction, padding, and alignment of elements. This ensures layouts like buttons, lists, and cards instantly adapt (scale/shrink) to content changes or different screen sizes without manual adjustments.&lt;/p&gt;

&lt;p&gt;Once you’ve built and tested your Figma layout, converting it into code becomes the easy part.&lt;/p&gt;
&lt;h2&gt;
  
  
  Tools for Figma to Code Generation
&lt;/h2&gt;

&lt;p&gt;By the time you’re done with the wireframe and colours, and your portfolio is live on Figma, it’s time to convert that Figma design into code. There are two ways to do so:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Manual Method&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AI Method&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  How to Manually Convert Figma Designs to Code
&lt;/h3&gt;

&lt;p&gt;When you design a website or app in Figma, the next big step is turning that design into working code. Traditionally, developers have done this manually: inspecting each element, writing HTML, CSS, and then refining the layout in frameworks like React or Tailwind CSS.&lt;/p&gt;

&lt;p&gt;It’s important to understand &lt;strong&gt;how this process is normally done by hand&lt;/strong&gt;. This is the foundation that every frontend developer relies on — and it’s also what helps you evaluate and improve AI-generated code later.&lt;/p&gt;

&lt;p&gt;When you design a website or app in Figma, the next step is to translate that visual layout into real HTML, CSS, and JavaScript. Developers usually start by examining each element in the design – its size, spacing, typography, colour, and layout rules – and manually rebuilding it in code.&lt;/p&gt;
&lt;h3&gt;
  
  
  Exporting Visual Assets
&lt;/h3&gt;

&lt;p&gt;Using Figma’s &lt;em&gt;Export&lt;/em&gt; panel, you download only what needs to be recreated visually in code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;icons&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;illustrations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;logos&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;images or thumbnails&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most structural elements (buttons, cards, sections, containers) are &lt;strong&gt;not&lt;/strong&gt; exported – you’ll need to build them using HTML and CSS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx6uvuqdrndkbjmj2z7zc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx6uvuqdrndkbjmj2z7zc.png" alt="figma-export-panel" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Rebuilding the Layout with HTML and CSS
&lt;/h3&gt;

&lt;p&gt;You’ll recreate the page section by section:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Setting up the HTML structure&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Adding Flexbox or CSS Grid for layouts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Applying typography exactly as specified in Figma&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Matching spacing using padding, margins, and gaps&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Defining colours using the hex codes from the Figma Inspector&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re using Tailwind CSS, this becomes a matter of applying the right utility classes, but the logic remains the same: &lt;em&gt;everything is recreated manually&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Once you have your Figma layout ready, the real work happens inside your code editor (which for me is VS Code). Here’s how developers traditionally rebuild the UI one section at a time.&lt;/p&gt;
&lt;h3&gt;
  
  
  Set Up Your Project Structure
&lt;/h3&gt;

&lt;p&gt;In VS Code, create your project structure. It’ll look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;project/
 ├─ index.html
 ├─ styles.css
 ├─ /assets
 │    ├─ logo.svg
 │    ├─ hero-image.png
 │    └─ icons/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you’re using React, this becomes the structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;src/
 ├─ App.jsx
 ├─ components/
 ├─ index.css
 ├─ assets/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This structure mirrors what you saw in Figma: each major design section becomes a container or component.&lt;/p&gt;

&lt;h3&gt;
  
  
  Write the HTML Structure Section-by-Section
&lt;/h3&gt;

&lt;p&gt;Now, you’ll look at the Figma frame and convert it to raw markup.&lt;/p&gt;

&lt;p&gt;As an example, let’s look at the Hero Section.&lt;/p&gt;

&lt;p&gt;Figma frame shows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;a headline&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;subtext&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;a button&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;an illustration&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So your HTML becomes this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"hero"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"hero-content"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Modern UI for Everyone&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Beautiful designs built for speed and accessibility.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"cta-btn"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Get Started&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"assets/hero-image.png"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Hero illustration"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"hero-img"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You're essentially mapping each Figma layer onto an HTML element.&lt;/p&gt;

&lt;h3&gt;
  
  
  Build Layouts Using Flexbox or Grid
&lt;/h3&gt;

&lt;p&gt;In Figma, layouts are visual. In HTML/CSS, you must &lt;strong&gt;translate&lt;/strong&gt; the layout rules.&lt;/p&gt;

&lt;p&gt;If Figma shows two columns (text + image), you’ll use Flexbox:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.hero&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;space-between&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If Figma has a 3-card layout, you’ll use Grid:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.features&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;repeat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You literally reconstruct the layout &lt;em&gt;from scratch&lt;/em&gt; by interpreting the Figma frame’s structure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Apply Typography Exactly as in Figma
&lt;/h3&gt;

&lt;p&gt;Next, you’ll go to Figma, select a text layer, and check the &lt;strong&gt;Inspector&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Font family: Inter&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Font size: 36px&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Line height: 44px&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Font weight: 700&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Letter spacing: -1%&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then recreate it like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.hero&lt;/span&gt; &lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;'Inter'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;36px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;44px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;700&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;letter-spacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-0.01em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is why developers need to know their fundamentals: AI tools often miss these fine details.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recreate Spacing With Padding, Margins, Gaps
&lt;/h3&gt;

&lt;p&gt;In Figma, spacing is visual. But in code, you must &lt;em&gt;calculate and apply&lt;/em&gt; it.&lt;/p&gt;

&lt;p&gt;Example Figma spacing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Padding inside a button: 16px vertical / 32px horizontal&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Margin below a heading: 24px&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gap between elements: 32px&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So you write this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.cta-btn&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16px&lt;/span&gt; &lt;span class="m"&gt;32px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.hero&lt;/span&gt; &lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.hero-content&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;32px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything must match the design. And in this case, spacing is what makes UI look polished.&lt;/p&gt;

&lt;h3&gt;
  
  
  Apply Colours Using Figma Hex Codes
&lt;/h3&gt;

&lt;p&gt;In Figma Inspector:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Primary Blue → &lt;code&gt;#4A78FF&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Background → &lt;code&gt;#F8FAFC&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Text → &lt;code&gt;#1A1A1A&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In your CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#F8FAFC&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#1A1A1A&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.cta-btn&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#4A78FF&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll need to manually copy each hex code into CSS, as this is where accuracy matters.&lt;/p&gt;

&lt;h3&gt;
  
  
  (If Using Tailwind) Apply Utility Classes Instead of Writing CSS
&lt;/h3&gt;

&lt;p&gt;Switching back and forth between your Figma design and a separate CSS file can slow down your whole workflow. Tailwind CSS solves this by letting you write styles &lt;strong&gt;right inside your HTML&lt;/strong&gt; using small, reusable utility classes.&lt;/p&gt;

&lt;p&gt;In this guide, you’ll learn how to take the exact pixel values you see in the &lt;strong&gt;Figma Inspector&lt;/strong&gt; and turn them into &lt;strong&gt;Tailwind utilities&lt;/strong&gt;—without confusion.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Understand Tailwind’s Spacing Scale
&lt;/h3&gt;

&lt;p&gt;Tailwind doesn’t use raw pixel values. Instead, it uses a &lt;strong&gt;consistent spacing scale&lt;/strong&gt;, usually based on a 4px grid.&lt;/p&gt;

&lt;p&gt;Here’s the simple rule:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Take the pixel value from Figma → divide by 4 → that number becomes your Tailwind utility.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;Figma&lt;/p&gt;

&lt;p&gt;Tailwind&lt;/p&gt;

&lt;p&gt;Meaning&lt;/p&gt;

&lt;p&gt;&lt;code&gt;margin-top: 32px&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;mt-8&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;32 ÷ 4 = 8 → so the class is &lt;code&gt;mt-8&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Prefixes you need to know
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;m&lt;/code&gt; = margin&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;p&lt;/code&gt; = padding&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;t&lt;/code&gt;, &lt;code&gt;b&lt;/code&gt;, &lt;code&gt;l&lt;/code&gt;, &lt;code&gt;r&lt;/code&gt; = top, bottom, left, right&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;x&lt;/code&gt; = horizontal (left + right)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;y&lt;/code&gt; = vertical (top + bottom)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 2: Converting Complex Padding
&lt;/h3&gt;

&lt;p&gt;If your Figma element uses different padding for X and Y, convert each side separately.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;Figma&lt;/p&gt;

&lt;p&gt;Tailwind&lt;/p&gt;

&lt;p&gt;Meaning&lt;/p&gt;

&lt;p&gt;&lt;code&gt;padding: 16px 32px&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;py-4 px-8&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;16 ÷ 4 = 4 → &lt;code&gt;py-4&lt;/code&gt;&lt;br&gt;&lt;br&gt;
32 ÷ 4 = 8 → &lt;code&gt;px-8&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 3: Converting Font Sizes
&lt;/h3&gt;

&lt;p&gt;Tailwind doesn’t use pixel sizes for fonts. Instead, it uses semantic names — almost like T-shirt sizes.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;Figma Font Size&lt;/p&gt;

&lt;p&gt;Tailwind Class&lt;/p&gt;

&lt;p&gt;Meaning&lt;/p&gt;

&lt;p&gt;&lt;code&gt;36px&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;text-4xl&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Tailwind’s &lt;code&gt;4xl&lt;/code&gt; matches 36px in the default scale&lt;/p&gt;

&lt;p&gt;This encourages typography consistency, instead of manually choosing random font sizes.&lt;/p&gt;
&lt;h3&gt;
  
  
  Why This Method Is So Fast
&lt;/h3&gt;

&lt;p&gt;Once you get used to it, the workflow becomes second nature:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Figma&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;→&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;divide&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;by&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;4&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;→&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;apply&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Tailwind&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;class&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No switching files.&lt;br&gt;&lt;br&gt;
No naming CSS classes.&lt;br&gt;&lt;br&gt;
No extra stylesheet bloat.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Just fast, direct, design-to-code translation.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Try It Yourself
&lt;/h3&gt;

&lt;p&gt;Open a Figma component—like a button or a card—and check its spacing, padding, and font size in the Inspector. Then convert everything using the simple rules above.&lt;/p&gt;

&lt;p&gt;Before long, you’ll be turning Figma designs into clean Tailwind code in seconds.&lt;/p&gt;

&lt;p&gt;You still translate Figma to code manually.&lt;/p&gt;

&lt;h3&gt;
  
  
  Making It Responsive
&lt;/h3&gt;

&lt;p&gt;You check how the design should behave on different screen sizes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;stacking vs. side-by-side layouts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;font scaling&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;spacing adjustments&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;collapsing navigation or rearranging grids&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This requires writing responsive styles and breakpoints, which AI tools can attempt but rarely perfect.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why the Manual Way Is Important
&lt;/h3&gt;

&lt;p&gt;Even though it takes more time, this approach teaches fundamentals that AI tools simply can’t replace:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;How spacing systems work&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How components behave in real browsers&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How layout changes across devices&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to optimise for performance and accessibility&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These skills allow you to &lt;strong&gt;inspect code intelligently&lt;/strong&gt; and improve it wherever needed, which is &lt;em&gt;almost always necessary&lt;/em&gt;, no matter which tool you use.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Use AI Tools to Convert Figma Designs to Code (Optional)
&lt;/h3&gt;

&lt;p&gt;To speed up this process, you can now use AI-powered and automated Figma-to-code tools. These tools analyse the Figma file and instantly generate code that you can integrate into your tech stack.&lt;/p&gt;

&lt;p&gt;There are multiple tools available in the market, like  V0, Builder.io, and Kombai.&lt;/p&gt;

&lt;h4&gt;
  
  
  What Is &lt;a href="https://kombai.com" rel="noopener noreferrer"&gt;Kombai&lt;/a&gt;?
&lt;/h4&gt;

&lt;p&gt;An IDE extension that converts selected Figma frames into React/NextJS/React Native code and offers repo-aware features&lt;/p&gt;

&lt;h4&gt;
  
  
  What Is &lt;a href="https://v0.dev" rel="noopener noreferrer"&gt;V0&lt;/a&gt;?
&lt;/h4&gt;

&lt;p&gt;A Vercel project focused on fast UI generation, integrated with Next.js workflows&lt;/p&gt;

&lt;h4&gt;
  
  
  What Is &lt;a href="https://Builder.io" rel="noopener noreferrer"&gt;Builder.io&lt;/a&gt;?
&lt;/h4&gt;

&lt;p&gt;A visual CMS with Figma integration and a visual editor that can export components for web apps&lt;/p&gt;

&lt;h4&gt;
  
  
  Building Live
&lt;/h4&gt;

&lt;p&gt;For demonstration purposes, I’ll be using Kombai, a VS Code extension. And since most of us developers spend a lot of time inside VS Code, it’s the perfect place to test it out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To install it in VS Code, simply open the Extensions Marketplace, search for 'kombai', click 'Install' and open the extension.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg6k4o28fdx8fw9nuuo4c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg6k4o28fdx8fw9nuuo4c.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now, at the agent panel, click on the “Let’s get started” button and sign up or log in with your credentials.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiyxx7v41t4fxcmz4g9vy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiyxx7v41t4fxcmz4g9vy.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now it’s time to test the agent for real work. To do so, I’ll be using the Figma file attached to build this portfolio.&lt;/p&gt;

&lt;p&gt;A few things to keep in mind as you get going:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You’ll need to enable WebGL if Figma is not working on your browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You need to know how to copy the Figma file link and how to export the design from Figma.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To copy the Figma design file link, open your Figma design file and simply select your desired design, select copy/paste, and then select copy link to selection. It will copy the complete design file URL.&lt;/p&gt;

&lt;p&gt;You can also copy the link of any Figma component and follow the same approach to get the desired outcome.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqpjx9yp3nve7dmey4xpk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqpjx9yp3nve7dmey4xpk.png" alt="figma-design-portfolio" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open the agent extension in VSCode and select the Figma (icon) agent at the bottom of the agent toolbar. It will open a new pop-up. In it, paste the link you copied to the design file (check the screenshot below). Then you can prompt the agent with what you want it to do with this Figma file.&lt;/p&gt;

&lt;p&gt;In my case, I wanted to replicate the same design, so I gave this prompt along with my Figma design link:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“You are an expert UI/UX designer and your task is to build and replicate the entire Figma design in the HTML/CSS/JS code from the attached URL.“&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After confirming this, the agent will start working to replicate the same design as you’ve seen in the Figma file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Farkna115p8a4g2y00bke.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Farkna115p8a4g2y00bke.png" alt="figma-to-code-kombai-agent" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here are the results:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttm1howc5ahfehz9lkp4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttm1howc5ahfehz9lkp4.png" alt="figma-to-code-kombai-output" width="800" height="1889"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you have the full picture of both approaches and when to use each one.&lt;/p&gt;

&lt;p&gt;Here is the live Project link - &lt;a href="https://fcc-demo.netlify.app/" rel="noopener noreferrer"&gt;FCC FIGMA TO CODE&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the GitHub link for the project code - &lt;a href="https://github.com/prankurpandeyy/fcc-demo-portfolio" rel="noopener noreferrer"&gt;Github Code&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenges in AI-Generated Code (and Why Developer Oversight Is Essential)
&lt;/h3&gt;

&lt;p&gt;AI tools can speed up the design-to-code process, but the output is rarely production-ready. Most tools struggle with layout precision, accessibility, and responsiveness, especially in real-world designs. You should expect to review and improve various parts of the generated code, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Spacing and alignment issues:&lt;/strong&gt; AI may misinterpret padding, margins, or grid spacing, so layouts often need manual adjustment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Responsive breakpoints:&lt;/strong&gt; Most tools generate layouts for a single screen size. You still need to add tablet/mobile breakpoints and test them across devices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Semantic HTML:&lt;/strong&gt; AI tends to use too many &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; elements instead of meaningful tags like &lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;, or &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Accessibility gaps:&lt;/strong&gt; Missing alt text, improper labels, weak colour contrast choices, and a lack of ARIA(HTML Tags) attributes are common issues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Utility class overload (in Tailwind-based code):&lt;/strong&gt; AI outputs long, repetitive class lists that need cleanup for maintainability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inconsistent component structure:&lt;/strong&gt; AI may generate components that aren’t reusable or follow naming conventions, so refactoring is often required.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tokens and theming:&lt;/strong&gt; Colours, font sizes, and spacing may not map to design tokens unless manually corrected.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because of these limitations, AI-generated code should be treated as a &lt;strong&gt;starting point&lt;/strong&gt;, not a final product. You’ll still need to validate the logic, refine the structure, and ensure the final result meets real-world quality standards. AI reduces repetitive work, but you, as the developer, need to ensure the code’s correctness, accessibility, and long-term maintainability.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I Prefer
&lt;/h3&gt;

&lt;p&gt;The manual method gives you complete control and teaches you the fundamentals, which are essential for understanding how layouts, spacing, and components actually translate into real code.&lt;/p&gt;

&lt;p&gt;When you write the HTML, CSS, and component structure yourself, you build a deeper understanding of how layouts, spacing, responsiveness, typography, and accessibility truly work under the hood. These fundamentals are what make you a strong frontend developer, and no automated tool can replace that learning.&lt;/p&gt;

&lt;p&gt;AI-assisted design-to-code tools can help with speed – especially in the early stages when you just want a quick starting point. They remove some of the repetitive setup work, but the output almost always needs refinement.&lt;/p&gt;

&lt;p&gt;In real projects, the most dependable workflow is a combination of both approaches: Use automation only for the boilerplate, then rely on your own frontend knowledge to clean up, reorganise, and fine-tune the interface so it meets real-world standards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Personally, I still prefer coding my designs manually because it keeps me connected to the craft and helps me build muscle memory. It’s the only way to fully understand how the design translates into a live, responsive interface and how each decision affects performance and user experience.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI tools don’t replace frontend developers. They simply support them. They handle repetitive tasks so you can focus on the skills that truly matter: clarity of structure, accessibility, responsive behaviour, and crafting an experience that feels polished and intentional.&lt;/p&gt;

&lt;h2&gt;
  
  
  Copywriting for Your Portfolio
&lt;/h2&gt;

&lt;p&gt;Now that your portfolio is designed and coded, let’s turn our attention back to what it actually says.&lt;/p&gt;

&lt;p&gt;Copywriting is the art of using words to convince people to take a specific action, like buying a product, signing up for a service, or visiting a website. It’s a mix of creativity and marketing, where words are used to sell ideas or products smartly and emotionally.&lt;/p&gt;

&lt;p&gt;A copywriter writes many types of content, from sales pages, website text, and social media posts to ad scripts and emails. The goal is simple: to make people take action.&lt;/p&gt;

&lt;p&gt;So what makes copywriting effective?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Knowing your audience:&lt;/strong&gt; A good copywriter understands what people need, what problems they face, and what motivates them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Using persuasive words:&lt;/strong&gt; Words that spark emotions and make readers want to act.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clarity and impact:&lt;/strong&gt; Keeping the message short, clear, and easy to understand.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Consistent brand voice:&lt;/strong&gt; Writing in a tone that matches the brand’s personality — whether it’s fun, professional, or inspiring.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How to Use Copywriting in Your Portfolio
&lt;/h3&gt;

&lt;p&gt;Your portfolio isn’t just about showing your work – it’s about telling your story in a way that connects with people. That’s where copywriting comes in. Good copy turns your portfolio from a plain showcase into something that feels personal, clear, and convincing.&lt;/p&gt;

&lt;p&gt;Here’s how you can use copywriting effectively while building your portfolio:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Start With a Strong Headline
&lt;/h3&gt;

&lt;p&gt;The first line people see should instantly tell them &lt;em&gt;who you are&lt;/em&gt; and &lt;em&gt;what you do&lt;/em&gt;. For example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I build modern, responsive web apps that turn ideas into digital reality.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Your headline is like your elevator pitch: short, powerful, and clear.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Tell Your Story
&lt;/h3&gt;

&lt;p&gt;In the About Me section, don’t just list your skills. You should also tell visitors about your journey. Write about how you got started programming, what you’ve learned along the way, and what drives you. Keep it conversational and real, like you’re talking to a friend.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I started coding six years ago with simple HTML pages. Today, I design full-stack apps and help startups bring their ideas to life.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  3. Write Benefit-Focused Descriptions
&lt;/h3&gt;

&lt;p&gt;When you show your projects, don’t just describe &lt;em&gt;what&lt;/em&gt; you built. Explain &lt;em&gt;why&lt;/em&gt; it matters.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Instead of: “I built a task manager app.”&lt;br&gt;&lt;br&gt;
Try: “A simple, clutter-free task manager that helps users stay productive without distractions.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This small change turns your project into a &lt;em&gt;problem-solving story&lt;/em&gt;, not just a tech demo.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Add a Call-to-Action (CTA)
&lt;/h3&gt;

&lt;p&gt;Every portfolio should guide visitors toward an action, like contacting you, checking your GitHub, or reading your blog.&lt;/p&gt;

&lt;p&gt;Here are some examples:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Want to collaborate? Let’s build something amazing together.”&lt;br&gt;&lt;br&gt;
“Looking for a developer who writes clean and efficient code? Reach out!”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A clear CTA shows confidence and gives people a direction.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Keep It Simple and Authentic
&lt;/h3&gt;

&lt;p&gt;Avoid fancy words or buzzwords. Write like a human, not a brochure. Use simple, clear sentences that sound like your real voice.&lt;/p&gt;

&lt;p&gt;Good copywriting is not about being clever – it’s about being &lt;em&gt;clear and honest&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Maintain a Consistent Tone
&lt;/h3&gt;

&lt;p&gt;Whether your style is formal or friendly, keep it the same across all pages – home, about, projects, and contact. A consistent tone helps build your personal brand and makes your portfolio feel professional.&lt;/p&gt;

&lt;p&gt;Copywriting is the invisible thread that ties your portfolio together. It helps people not just &lt;em&gt;see&lt;/em&gt; your work, but &lt;em&gt;feel&lt;/em&gt; your story.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing Benchmarks for a Portfolio Website
&lt;/h2&gt;

&lt;p&gt;Before your portfolio goes live, it’s important to test it so that you know it looks and works as it’s supposed to. A fast, responsive, and accessible site leaves a strong first impression, and benchmarks help you measure whether it’s up to your standards. And a well-tested site loads faster, ranks better, and gives users (and recruiters) a seamless experience.&lt;/p&gt;

&lt;p&gt;Below are the key benchmarks you should always check, along with why they matter.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Page Load Time
&lt;/h3&gt;

&lt;p&gt;This is the time it takes for your page to fully load after someone visits it. A fast-loading site feels smooth and professional, while a slow one instantly turns people away.&lt;/p&gt;

&lt;p&gt;This matters because most visitors leave if a site takes more than 3 seconds to load. Tools like &lt;a href="https://gtmetrix.com" rel="noopener noreferrer"&gt;GTmetrix&lt;/a&gt; or Pingdom can help you track and improve page load speed by optimising images and reducing unnecessary scripts.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Core Web Vitals (LCP, INP, CLS)
&lt;/h3&gt;

&lt;p&gt;Google uses &lt;strong&gt;Core Web Vitals&lt;/strong&gt; to measure real-world user experience.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;LCP (Largest Contentful Paint):&lt;/strong&gt; How quickly your main content becomes visible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;INP (Interaction to Next Paint):&lt;/strong&gt; How fast your site responds when users interact.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CLS (Cumulative Layout Shift):&lt;/strong&gt; How stable your layout is while loading.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These metrics directly affect how users perceive your site and also impact SEO ranking. You can test them on &lt;a href="https://pagespeed.web.dev" rel="noopener noreferrer"&gt;PageSpeed I&lt;/a&gt;&lt;a href="https://pagespeed.web.dev" rel="noopener noreferrer"&gt;nsights.&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Mobile Friendliness
&lt;/h3&gt;

&lt;p&gt;Most people will view your portfolio on their phones, so it needs to look and work perfectly on smaller screens.&lt;/p&gt;

&lt;p&gt;A mobile-optimised site not only improves user experience but also ranks better on Google’s mobile search results. Use responsive layouts and flexible grids to ensure smooth viewing on all devices.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Accessibility Compliance (WCAG)
&lt;/h3&gt;

&lt;p&gt;Accessibility means making your portfolio usable for everyone, including people with disabilities.&lt;/p&gt;

&lt;p&gt;This is important because following WCAG standards (like proper colour contrast, keyboard navigation, and alt text for images) shows professionalism and inclusivity. Tools like Lighthouse or WAVE can help you check how your portfolio ranks for key accessibility metrics.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. SEO Best Practices
&lt;/h3&gt;

&lt;p&gt;SEO isn’t just for businesses. It can also help your personal site appear when someone searches your name or skills.&lt;/p&gt;

&lt;p&gt;If you add proper meta tags, structured headings (H1, H2, H3), and descriptive URLs, these features can help recruiters or clients find you more easily. A well-optimised portfolio often performs better on job searches and tech blogs.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Responsiveness (Interaction Delay)
&lt;/h3&gt;

&lt;p&gt;Responsiveness measures how quickly your website reacts when users click or scroll. And a laggy interface feels unprofessional and hurts user engagement. By minimising heavy scripts and optimising animations, you ensure smooth, immediate feedback for every action.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Security Checks (HTTPS)
&lt;/h3&gt;

&lt;p&gt;Even a simple portfolio needs &lt;strong&gt;HTTPS&lt;/strong&gt;. It builds trust and protects both you and your visitors from data breaches. Browsers like Chrome now flag non-secure sites, so enabling SSL is a must.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Resource Size (HTML, CSS, JS, Images)
&lt;/h3&gt;

&lt;p&gt;Heavy resources can slow everything down. Compressing files, minifying CSS/JS, and using next-gen image formats (like WebP) can dramatically improve speed and performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Browser and Device Compatibilit&lt;a href="https://pagespeed.web.dev" rel="noopener noreferrer"&gt;y&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Not everyone uses Chrome on a laptop. So make sure you test your portfolio across major browsers (Chrome, Firefox, Safari, Edge) and devices (desktop, tablet, mobile). Simulated testing tools like DebugBear or Basemark Web help catch layout issues early.&lt;/p&gt;

&lt;h3&gt;
  
  
  10. Real User Monitoring (RUM)
&lt;/h3&gt;

&lt;p&gt;Instead of just testing in a lab, RUM captures how real visitors experience your site. This helps you understand performance in real-world scenarios – on different devices, networks, and locations – and adjust your design based on real data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hosting Your Portfolio
&lt;/h2&gt;

&lt;p&gt;Now it’s time to push your changes to GitHub and deploy them on a hosting provider of your choice. Hosting services play a crucial role in showcasing your work. Depending on the type of projects you build, here are some of the best free hosting options that I have used so far for my personal and professional projects.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Vercel&lt;/strong&gt; – Best for Next.js/React projects, offering seamless deployment inside the Vercel ecosystem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GitHub Pages&lt;/strong&gt; – Great for hosting static websites and personal portfolios.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Netlify&lt;/strong&gt; – Ideal for frontend-heavy projects with easy deployment and CI/CD integration.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your portfolio is ready, and you can share it anywhere with just a link.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Use Your Portfolio Effectively
&lt;/h2&gt;

&lt;p&gt;Now that your portfolio is ready, it’s time to use it the right way. Whether you’re applying for a job, pitching to a freelance client, or simply networking with like-minded people, your portfolio is your strongest asset.&lt;/p&gt;

&lt;p&gt;Think of it as your digital introduction. It not only shows what you’ve built but also how you think and work. The key is to use it smartly in the right context.&lt;/p&gt;

&lt;p&gt;Let’s say you come across a job post or want to reach out directly to a recruiter or a company founder. Instead of just sending a plain résumé, you can make your message stand out by attaching your portfolio link. Here’s an example of how you can do it:&lt;/p&gt;

&lt;p&gt;Example email/direct message:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Hi [Hiring Manager/CEO Name],&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;I’m Prankur, a Full Stack Developer from India with over 6 years of experience building mobile and web applications.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;I came across the opening for [Job Title/Role] at your company and believe my skills align perfectly with what you’re looking for.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;You can explore my work here: [Portfolio URL]&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;I’m available to start immediately and excited about the opportunity to contribute to your team and codebase.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Best regards,&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Prankur Pandey&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This small but professional touch – including your portfolio link in every email, proposal, or LinkedIn message – increases your chances of being noticed. A well-presented portfolio speaks louder than a résumé, and it helps recruiters or clients quickly understand your skills, design sense, and coding depth.&lt;/p&gt;

&lt;p&gt;So, don’t just build your portfolio. &lt;strong&gt;Use it actively&lt;/strong&gt;. Share it on job boards, LinkedIn posts, your GitHub bio, or even in casual conversations with potential collaborators. Every share is a new opportunity waiting to unfold.&lt;/p&gt;

&lt;h2&gt;
  
  
  Q&amp;amp;A
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Is building a portfolio really important?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Absolutely. Instead of sending out a dozen links to your GitHub, Behance, and LinkedIn, it’s much more effective to combine all your work into one clean, accessible portfolio site. It makes you look organised, professional, and easy to evaluate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Is it worth buying a domain name?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Yes, it is, if you’re serious about your career. Having your own domain (like &lt;a href="http://yourname.dev" rel="noopener noreferrer"&gt;&lt;em&gt;yourname.dev&lt;/em&gt;&lt;/a&gt; or &lt;a href="http://yourname.com" rel="noopener noreferrer"&gt;&lt;em&gt;yourname.com&lt;/em&gt;&lt;/a&gt;) gives a personal and professional touch,&lt;/p&gt;

&lt;p&gt;But if you’re still learning or just experimenting, it’s fine to start with a free domain. Once you have solid projects to show, investing in your own domain is totally worth it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Can I use AI or no-code tools to build my portfolio?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
You can, but if you’re a developer, you should try coding it yourself first. It’s a great way to showcase your creativity and technical control over design and logic. Here’s a &lt;a href="https://www.freecodecamp.org/news/build-a-simple-portfolio-website-with-html-and-css/" rel="noopener noreferrer"&gt;simple and straightforward guide&lt;/a&gt; to help you get started with that.&lt;/p&gt;

&lt;p&gt;Once your design is ready, you can always use AI or no-code tools to speed up the process or automate parts of it. Think of AI as a helper, not a replacement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. How can I get AI tools for testing?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
It’s easy: visit the official websites of the tools you’re interested in and sign up. Most AI tools offer free trials or limited credits that you can use to explore and test their features based on your workflow and needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. I am just starting. What should I use: AI tools or the Manual Method?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
I strongly recommend using the Manual Method as it will help you to understand your craft well, and you will also build muscle memory about a technology and how it works.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Which Platform should I use for hosting?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Most of the hosting providers offer a free plan, so you can start with that. Then, when you feel the need to expand your portfolio, switch to a paid plan.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Notes
&lt;/h2&gt;

&lt;p&gt;Building a strong portfolio requires time, effort, and attention to detail. But it’s one of the smartest investments you can make in your tech career.&lt;/p&gt;

&lt;p&gt;Tools and templates can help speed up the process, but your creativity, skills, and storytelling are what truly make a portfolio stand out. A well-crafted portfolio not only shows what you can build, it reveals how you think and why your work matters.&lt;/p&gt;

&lt;p&gt;While you can use design tools, frameworks, or even AI assistance to save time, make sure you understand the basics of design, structure, and usability. The goal isn’t to create something flashy; it’s to produce something clear, professional, and authentic.&lt;/p&gt;

&lt;p&gt;Your portfolio is your digital identity, so treat it like your personal brand. Keep refining it as your skills grow and let it evolve alongside your career.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;A portfolio isn’t just a website. It’s your story told through your work. It helps employers, clients, and collaborators understand what you do best and why you stand out.&lt;/p&gt;

&lt;p&gt;In this article, I’ve shared everything that helped me build and refine my own portfolio, from understanding design structure and copywriting to testing and optimisation benchmarks. My goal is to help you create a portfolio that not only looks great but also opens real opportunities for you.&lt;/p&gt;

&lt;p&gt;In my next tutorial, I’ll explore something new for sure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design + Creativity+Development + Execution = The Ultimate Developer Stack 🔥&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Keep learning, keep building, and most importantly — keep sharing your work.&lt;/p&gt;

&lt;p&gt;If you found this article useful, feel free to let me know. I’m always open to learning, collaboration, and new opportunities.&lt;/p&gt;

&lt;p&gt;Now it's your turn: what are you building next? Let me know by sending me a DM!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Follow me on &lt;strong&gt;𝕏&lt;/strong&gt;: &lt;a href="https://x.com/prankurpandeyy" rel="noopener noreferrer"&gt;Prankur's&lt;/a&gt; &lt;strong&gt;𝕏&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Connect with me on LinkedIn: &lt;a href="https://linkedin.com/in/prankurpandeyy" rel="noopener noreferrer"&gt;Prankur's LinkedIn&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follow me on GitHub: &lt;a href="https://github.com/prankurpandeyy" rel="noopener noreferrer"&gt;Prankur’s GitHub&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;View my Portfolio: &lt;a href="https://prankurpandeyy.is-a.dev/" rel="noopener noreferrer"&gt;Prankur's Portfolio&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>figma</category>
      <category>frontend</category>
      <category>ai</category>
    </item>
    <item>
      <title>AI in Frontend Development: Lessons from Testing Modern Figma-to-Code Tools like V0, Builder.io, and Kombai</title>
      <dc:creator>PRANKUR PANDEY</dc:creator>
      <pubDate>Thu, 06 Nov 2025 04:55:57 +0000</pubDate>
      <link>https://dev.to/prankurpandeyy/ai-in-frontend-development-lessons-from-testing-modern-design-to-code-tools-like-v0-builderio-4g2h</link>
      <guid>https://dev.to/prankurpandeyy/ai-in-frontend-development-lessons-from-testing-modern-design-to-code-tools-like-v0-builderio-4g2h</guid>
      <description>&lt;p&gt;Over the past few weeks, I’ve been exploring a range of AI tools, testing them in real projects and integrating them into my daily workflow. My goal was simple: to see how far AI can truly go in helping developers build real, production-ready products.&lt;/p&gt;

&lt;p&gt;During this time, I used several of these tools to ship client projects, including a full web MVP built in just 30 days and an Android mobile app. Since I already had the UI designs, my main focus was turning them into fast, pixel-perfect frontends and integrating a solid backend behind them. Throughout that process, I tried dozens of AI tools for both frontend and backend tasks.&lt;/p&gt;

&lt;p&gt;In a space where every major company is experimenting with AI, I wanted to dig deeper and test tools that don’t just generate code but also understand design.&lt;/p&gt;

&lt;p&gt;In this article, I’ll take you behind the scenes of my experience with front-end AI tools. I’ll talk about how they performed, what impressed me, and why prompting is a crucial skill every developer should master when using AI tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What We Will Cover&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;What is an AI Agent?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is Front-End Development (and Why It’s So Challenging)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Front-End Tools, Technologies &amp;amp; Web Design Essentials&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;My experience with AI Tools&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Why and How I tested the AI Agent&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The 12 Benchmarks I Used to Compare AI Design-to-Code Tools&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testing in Real Time&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Benchmark 1: Setting Up the Tools&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Benchmark 2: Testing Figma to Code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Feature Table&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A Few Areas to Improve&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to give proper context and prompts to AI Agents/tools&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Q&amp;amp;A&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Final Notes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conclusion&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is an AI Agent?
&lt;/h2&gt;

&lt;p&gt;AI agents are computer programs that can do certain jobs on their own. They collect information, think about it, and then decide what to do — a bit like how people make decisions.&lt;/p&gt;

&lt;p&gt;For example, a customer help agent can look for answers to a person’s question or ask a real person to help if needed.&lt;/p&gt;

&lt;p&gt;Here’s how AI agents work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Have a goal:&lt;/strong&gt; Each agent is given something to do, like “answer people’s questions” or “help design something.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Make choices:&lt;/strong&gt; The agent decides on its own how to do that job in the best way.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use information:&lt;/strong&gt; It looks around – like reading messages, files, or the internet – to find helpful data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Take action:&lt;/strong&gt; It performs an action based on what it has learned, such as replying to someone, finishing a task, or using another app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Work by themselves:&lt;/strong&gt; They can do many things without people telling them each step, but for very hard problems, they can ask a person for help.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Agents can learn and improve over time, and they get better with practice. Agents can also work together and share information to more effectively finish a big job. And they can use other programs that help them get live information, like the weather or news.&lt;/p&gt;

&lt;p&gt;Examples of agents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Customer help:&lt;/strong&gt; An agent can answer customer questions and find solutions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Computer work:&lt;/strong&gt; It can help make apps, write small parts of code, or fix basic computer tasks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Personal helper:&lt;/strong&gt; Voice apps like Google Assistant can set reminders or answer your questions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is Front-End Development (and Why It’s So Challenging)
&lt;/h2&gt;

&lt;p&gt;Front-end development is the part of web and app creation that users actually see and interact with. It’s where creativity meets logic, and where we turn designs into real, functional experiences. Every button you click, animation you notice, and page you scroll through is built by front-end developers.&lt;/p&gt;

&lt;p&gt;A front-end dev’s goal is simple but demanding: make websites beautiful, fast, and easy to use. That means balancing visuals with performance, like choosing the right layouts, colours, and interactions so everything feels smooth and intuitive.&lt;/p&gt;

&lt;p&gt;The front end is often called the &lt;em&gt;client side&lt;/em&gt;. It’s what users touch and feel. Behind it is the &lt;em&gt;back end&lt;/em&gt;, which handles servers, data, and logic. APIs connect the two, ensuring design and functionality work together.&lt;/p&gt;

&lt;p&gt;But building that harmony isn’t easy. Front-end development moves fast, and developers face constant challenges:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Keeping up with change:&lt;/strong&gt; New frameworks and tools appear every month. The key is to learn continuously but choose wisely.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cross-device consistency:&lt;/strong&gt; Websites must look great on every screen, from desktop to mobile.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Speed and performance:&lt;/strong&gt; Users hate waiting, so optimising code, images, and assets keeps experiences fast.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Responsive design:&lt;/strong&gt; Adapting layouts for different devices is now a must, not a choice.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Accessibility:&lt;/strong&gt; Good design includes everyone. Small tweaks like clear colours and keyboard navigation matter.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;State management:&lt;/strong&gt; Handling dynamic data efficiently is crucial for smooth user interactions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Collaboration:&lt;/strong&gt; Front-end work is teamwork – Git, reviews, and automation keep projects organised.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short, front-end development is the art of turning design into function. It’s all about crafting interfaces that look great, perform well, and feel effortless. It’s fast, creative, and constantly evolving – and that’s exactly what makes it so exciting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Front-End Tools, Technologies &amp;amp; Web Design Essentials
&lt;/h2&gt;

&lt;p&gt;Before exploring AI-assisted tools, it’s important to understand the basics of how modern front-end development works.&lt;/p&gt;

&lt;p&gt;At its core, every website runs on three pillars: &lt;strong&gt;HTML&lt;/strong&gt;, &lt;strong&gt;CSS&lt;/strong&gt;,  and &lt;strong&gt;JavaScript&lt;/strong&gt;. HTML gives structure to the page, CSS handles the design, and JavaScript adds interactivity. Together, they turn static layouts into dynamic experiences.&lt;/p&gt;

&lt;p&gt;Once you’ve mastered the basics, frameworks and libraries help you move faster:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;React&lt;/strong&gt; makes it easy to build reusable UI components that scale well.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Next.js&lt;/strong&gt; adds server-side rendering and better SEO performance for modern web apps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tailwind CSS&lt;/strong&gt; speeds up styling with ready-to-use utility classes, helping developers design responsive layouts in less time.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Good design is just as important as good code. Web design focuses on usability, layout, and visual appeal, ensuring users find what they need effortlessly. A great design balances aesthetics with performance and accessibility, working smoothly across devices and screen sizes.&lt;/p&gt;

&lt;p&gt;As a developer, it’s also crucial to think like a designer: paying attention to typography, spacing, and colour harmony. Tools like Figma, Adobe XD, and Sketch make collaboration between designers and developers easier by providing visual clarity before coding begins.&lt;/p&gt;

&lt;p&gt;In short, mastering these tools – from HTML and CSS to React, Next.js, and Figma – gives you everything you need to build fast, responsive, and visually engaging web experiences.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Experience with AI Tools
&lt;/h2&gt;

&lt;p&gt;As AI is changing how software is being built and delivered, I have had the opportunity to explore and work with a lot of tools in the areas of Web Development, Data Analysis, Testing, DevOps and Web Design. And I’m impressed by the quality of work that an AI agent can do based on what I have observed so far.&lt;/p&gt;

&lt;p&gt;But what I’ve learned is that you will have plan very smartly if you’re going to use any AI tools for your projects, especially if you’re building full stack software. This process requires that multiple parts talk in parallel – and if you don’t give the AI clear context and a well-crafted and specific prompt, chances are things won’t turn out as you hoped.&lt;/p&gt;

&lt;p&gt;I have used many of the top AI tools like Cursor, Windsurf, Replit, V0 by vercel, and Bolt.dev for my personal projects. But for my clients, I still prefer doing things primarily on my own, using AI as a helpful tool when appropriate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why and How I Tested the AI Agent
&lt;/h2&gt;

&lt;p&gt;If you’ve ever built a mobile or web app from a Figma design, you already know the pain. Manually copying pixels, measuring paddings, and aligning text styles is like playing Tetris with code.&lt;/p&gt;

&lt;p&gt;Recently, I was building a mobile app for a client. I received a complex Figma design with over 20 screens, animations, and responsive layouts. My task was to turn it into real, production-ready code: design, develop, integrate the backend, and finally deploy it to the Play Store.&lt;/p&gt;

&lt;p&gt;The work was rewarding, but one thing was painfully clear: Copying and pasting values from Figma to the code editor was exhausting and time-consuming.&lt;/p&gt;

&lt;p&gt;That’s when I started looking for a smarter way to do this – and stumbled upon “Design to Code” tools like Kombai, Builder.io, and V0. These are the tools we’ll be examining here, so let’s meet them.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Is Kombai?
&lt;/h3&gt;

&lt;p&gt;Kombai is an AI-powered design-to-code platform that converts Figma designs into clean, production-grade React, React Native, or Next.js code.&lt;/p&gt;

&lt;p&gt;But it’s not just a Figma converter. It positions itself as a front-end intelligence layer. It’s an AI agent that understands your codebase, plans refactors, and applies real-world development logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Is V0?
&lt;/h3&gt;

&lt;p&gt;V0 is an AI-powered design-to-code from the Vercel platform that converts Figma designs into clean, production-grade code, along with an option to build a modern frontend design with prompts. V0 is specialised in making frontends with prompts.&lt;/p&gt;

&lt;p&gt;V0 focuses on seamless Next.js integration and instant code generation within the Vercel ecosystem, and it’s ideal for rapid prototyping.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Is Builder.io?
&lt;/h3&gt;

&lt;p&gt;Builder.io is an AI-powered design-to-code tool, from the Vercel platform, that converts Figma designs into clean, production-grade React or Next.js code, along with an option to build&lt;/p&gt;

&lt;p&gt;&lt;a href="http://Builder.io" rel="noopener noreferrer"&gt;Builder.io&lt;/a&gt;, on the other hand, takes a visual-first approach, combining CMS-like editing with design-to-code export capabilities&lt;/p&gt;

&lt;h3&gt;
  
  
  Why I Decided to Test and Compare
&lt;/h3&gt;

&lt;p&gt;My first impression was curiosity mixed with skepticism. The benchmarks for all the coding tools were awesome, as each company claims they are perfect for the desired niche. But I wasn’t satisfied with their claims, so I decided to test them on my own and then make a final call.&lt;/p&gt;

&lt;p&gt;My goals were simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;See how well each tool translates design components into usable React code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test their understanding of layouts, responsiveness, and reusability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Evaluate whether these tools can genuinely save time for real developers, not just look fancy in demos.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The end goal was to chase these personal benchmarks which I set for myself:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fggbi2lselyjwh6wqnk03.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fggbi2lselyjwh6wqnk03.jpeg" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The 12 Benchmarks I Used to Compare AI Design-to-Code Tools
&lt;/h2&gt;

&lt;p&gt;When testing tools that turn Figma designs into code, it’s easy to get lost in flashy features. So instead of judging by first impressions, I used a set of clear benchmarks: things that actually matter to developers when building real projects.&lt;/p&gt;

&lt;p&gt;Here’s a simple explanation of each benchmark I wanted to test and why it’s important:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Setup and Integration
&lt;/h3&gt;

&lt;p&gt;This checks how easy it is to get started. Can you connect your Figma design and start generating code quickly? A smooth setup means less time configuring and more time creating.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Figma-to-Code Workflow
&lt;/h3&gt;

&lt;p&gt;This is the heart of the process. It measures how accurately and efficiently the tool turns your Figma design into working code. The better this step is, the less time developers spend fixing layout or spacing issues later.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Live Preview / Sandbox
&lt;/h3&gt;

&lt;p&gt;A live preview lets you instantly see what the generated code looks like, right inside your browser or IDE.&lt;br&gt;&lt;br&gt;
This saves hours because you don’t have to export, run, or reload files just to check small design changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Repo and Code Intelligence
&lt;/h3&gt;

&lt;p&gt;This one looks at whether the tool understands existing projects. Can it read your GitHub repo, generate documentation, or give code improvement suggestions? If yes, it’s more than just a design-to-code converter – it’s a real coding assistant.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Code Quality and Structure
&lt;/h3&gt;

&lt;p&gt;This measures how clean, readable, and reusable the code is. Good tools generate code that looks like a developer wrote it – not a machine. This makes collaboration and scaling much easier.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. AI Assistance / Agent Mode
&lt;/h3&gt;

&lt;p&gt;Modern AI tools often act like smart teammates. This benchmark checks if the AI can refactor, explain, or modify code when you ask, not just generate it once and stop. A good AI agent saves time by helping you understand your own code better.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Design Fidelity
&lt;/h3&gt;

&lt;p&gt;This is about accuracy. Does the generated code look exactly like your original Figma design? If the fonts, colours, and layouts don’t match, the whole purpose of using such a tool is lost.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Responsiveness
&lt;/h3&gt;

&lt;p&gt;Websites and apps must work well on all screen sizes, from mobile phones to big desktop monitors.&lt;br&gt;&lt;br&gt;
This benchmark checks if the tool automatically handles breakpoints and layouts for different devices.&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Cross-Platform Capability
&lt;/h3&gt;

&lt;p&gt;Some tools only work for the web, while others can generate code for mobile or native apps too. Cross-platform support means you can reuse the same design logic across multiple projects, saving huge amounts of time.&lt;/p&gt;

&lt;h3&gt;
  
  
  10. Target Audience Fit
&lt;/h3&gt;

&lt;p&gt;Not every tool is made for every kind of user. Some are developer-focused, others are more for designers or content teams. This benchmark helps identify who will benefit the most from each tool.&lt;/p&gt;

&lt;h3&gt;
  
  
  11. Unique Differentiator
&lt;/h3&gt;

&lt;p&gt;Every tool needs to have something special. It could be repo analysis, AI-assisted coding, or tight integration with deployment platforms like Vercel. This benchmark helps highlight what makes one tool stand out from the crowd.&lt;/p&gt;

&lt;h3&gt;
  
  
  12. Overall Performance and Value
&lt;/h3&gt;

&lt;p&gt;Finally, this is the big picture: how well the tool performs across all areas combined. Does it really save time? Is it worth using for production work, or only for prototypes? This helps developers decide whether it’s worth adopting long-term.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing in Real Time
&lt;/h2&gt;

&lt;p&gt;Now it’s time to test the agents for real work. To do so, I’ll be using an open Figma file, which is complex and free for commercial use (for educational purposes only). Here is the &lt;a href="https://www.figma.com/design/tn2o5P6m5jdFNDTWh9hLkl/Education-or-Online-education-online-courses-or-elearning-or-lms-figma-template-6--Community-?t=yVVLzeuIPYdAcZKP-0" rel="noopener noreferrer"&gt;Figma file&lt;/a&gt;. I’ll use this file for all the demonstrations below.&lt;/p&gt;

&lt;p&gt;A few things to keep in mind as you get going:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You’ll need to enable WebGL if Figma is not working on your browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You need to know how to copy the Figma file link and how to export the design from Figma. To copy the Figma design file link, open your Figma design file and simply select your desired design, select copy/paste, and then select copy link to selection. It will copy the complete design file URL.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvqjjocszyt4wzbcfny4i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvqjjocszyt4wzbcfny4i.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now I’ll go through all the benchmarks one by one for each tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benchmark 1: Setting Up the Tools
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="http://www.kombai.com" rel="noopener noreferrer"&gt;Kombai&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;To install the Kombai extension in VS Code, simply open the Extensions Marketplace, search for 'Kombai', and click 'Install'.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg6k4o28fdx8fw9nuuo4c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg6k4o28fdx8fw9nuuo4c.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, click on the “Let’s get started” button and sign up or log in with your credentials.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiyxx7v41t4fxcmz4g9vy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiyxx7v41t4fxcmz4g9vy.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The agent extension UI looks like this on VSCode:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff22x3h98ncu1xqzkvqy5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff22x3h98ncu1xqzkvqy5.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="http://www.v0.dev" rel="noopener noreferrer"&gt;V0&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;To get started with V0, visit the official V0 website and sign up or log in with your credentials.&lt;/p&gt;

&lt;p&gt;After you’ve successfully login, you will be redirected to the screen below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fovpw0n30tld4usayt76h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fovpw0n30tld4usayt76h.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="http://www.builder.io" rel="noopener noreferrer"&gt;Builder.io&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Visit the official builder.io website and sign up or log in with your credentials.&lt;/p&gt;

&lt;p&gt;After you’ve successfully login, you will be redirected to the screen below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyvwabglw3d01n61g1mtr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyvwabglw3d01n61g1mtr.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select “Convert Figma to Code” and Click on “Continue with Fusion”.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0yd7mwh8p9zod76rv4cy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0yd7mwh8p9zod76rv4cy.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then select your tech stack. I chose &lt;strong&gt;React.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn0882bekzt5unsl2ev5f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn0882bekzt5unsl2ev5f.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you will be redirected to the screen below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4skvuajb299k3qqpabaz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4skvuajb299k3qqpabaz.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Benchmark 2: Testing Figma to Code
&lt;/h2&gt;

&lt;p&gt;I tested the agent with my Figma setup on both my client projects and personal projects first. I used a simple design (which I gave in the link above).&lt;/p&gt;

&lt;p&gt;To continue with our experiment, open the Figma design file and simply select your desired design. Then select copy/paste, and copy link to selection*&lt;em&gt;.&lt;/em&gt;* It will copy the complete design file URL. Now we’ll look at how each tool handles the process of converting Figma designs to code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Kombai
&lt;/h3&gt;

&lt;p&gt;Open the Kombai agent in VSCode and select Figma (icon) agent at the bottom of the agent toolbar. It will open a new pop-up. In it, paste the link you copied to the design file. Then you can prompt the agent with what you want it to do with this Figma file.&lt;/p&gt;

&lt;p&gt;In my case, I wanted to replicate the same design so I gave this prompt:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“You are an expert UI/UX designer and your task is to build and replicate the entire Figma design in the HTML/CSS/JS code from the attached URL.“&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After confirming this, the agent will start working to replicate the same design as you’ve shared in the Figma file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Farkna115p8a4g2y00bke.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Farkna115p8a4g2y00bke.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here are the results:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1761456490121%2Fc0523e7a-2566-4556-9a55-7d07ddf427b9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1761456490121%2Fc0523e7a-2566-4556-9a55-7d07ddf427b9.png" width="800" height="3302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also copy the link of any Figma component and follow the same approach to get the desired outcome.&lt;/p&gt;

&lt;h3&gt;
  
  
  V0
&lt;/h3&gt;

&lt;p&gt;V0 doesn’t allow you to directly import designs using a simple Figma link. Instead, it provides an “Import from Figma” workflow where you first need to export your Figma design then upload it to V0. Once imported, you’ll need to describe your intent through detailed prompts or upload a screenshot of the design for interpretation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzjkimqe7bmax8jiyz3qo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzjkimqe7bmax8jiyz3qo.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I followed this process myself, but it turned out to be quite time-consuming. The tool didn’t generate the expected layout in a single attempt – I had to refine my prompts multiple times to get a usable output. Each iteration also consumed additional tokens, which can add up quickly during experimentation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Builder.io
&lt;/h3&gt;

&lt;p&gt;Before starting, make sure everything is ready.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1: Install the Builder Plugin
&lt;/h4&gt;

&lt;p&gt;Go to the Figma Community and search for “Builder.io” or “Visual Copilot” and then install the plugin.&lt;/p&gt;

&lt;p&gt;You’ll want to use the auto layout option in Figma. This helps the AI understand your layout better (margins, spacing, and responsiveness). A clean Figma design means better code output.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2: Link Your Components
&lt;/h4&gt;

&lt;p&gt;This step makes &lt;a href="http://Builder.io" rel="noopener noreferrer"&gt;Builder.io&lt;/a&gt; special. You “teach” the AI what each part of your design actually means.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Example: Tell it, &lt;em&gt;“When you see this Figma Button, use my real&lt;/em&gt; &lt;code&gt;&amp;lt;PrimaryButton /&amp;gt;&lt;/code&gt; &lt;em&gt;React component.&lt;/em&gt;” This way, it doesn’t just copy pixels. Instead, it builds real, reusable components that match your existing codebase.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Step 3: Export Your Figma Design
&lt;/h4&gt;

&lt;p&gt;Once the components are mapped, exporting is simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Select the design frame you want.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open the Builder plugin and click &lt;strong&gt;“Smart Export.”&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The plugin copies all the important layout and style data automatically.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Step 4: Paste and Prompt the AI
&lt;/h4&gt;

&lt;p&gt;Now switch to Builder.io Fusion. This is where the AI magic happens. Paste what you copied from Figma into the AI input box. Then just add your prompt, making sure it’s short and clear.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Example: &lt;em&gt;“Build this as a React component named ProductCard.”&lt;/em&gt; You can also specify small tweaks like &lt;em&gt;“Make this layout stack vertically on mobile.”&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Step 5: Review and Refine
&lt;/h4&gt;

&lt;p&gt;Builder.io shows you a live preview of the generated code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Check the result:&lt;/strong&gt; Does it look and behave like your design?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Make tweaks:&lt;/strong&gt; You can ask the AI for updates directly, like &lt;em&gt;“Increase font size”&lt;/em&gt; or &lt;em&gt;“Add hover effect.”&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create your PR:&lt;/strong&gt; Once you’re happy, Builder.io helps you send it directly to GitHub as a Pull Request.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I found it too technical to simply convert a simple Figma design into code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F53uc6uvmad787h91gr8n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F53uc6uvmad787h91gr8n.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Benchmark 3: Real-Time Sandbox Preview
&lt;/h2&gt;

&lt;p&gt;All the tools mentioned in this blog provide a live sandbox preview where you can &lt;strong&gt;see the generated output instantly&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This reduced the guesswork — I didn’t have to export, clone, or rebuild just to check how it looked.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benchmark 4: Repo Analysis &amp;amp; Documentation
&lt;/h2&gt;

&lt;p&gt;Repo analysis is the ability to scan your GitHub repo, generate summaries, and even suggest architectural improvements. This feature alone could save &lt;strong&gt;hours of onboarding time&lt;/strong&gt; for new developers joining a project.&lt;/p&gt;

&lt;p&gt;I tested this feature for&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;V0 -&lt;/strong&gt; The Vercel repos can be connected easily, but understanding the complete code and context is still not available.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Builder.io-&lt;/strong&gt; It performs repository analysis not just for understanding, but for the explicit purpose of generating code that is &lt;em&gt;interoperable&lt;/em&gt; with and &lt;em&gt;dependent&lt;/em&gt; on your existing architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kombai -&lt;/strong&gt;I also tested &lt;strong&gt;repo intelligence&lt;/strong&gt; by connecting an existing as well as a old project, which generated a full &lt;code&gt;PROJECT_ANALYSIS.md&lt;/code&gt; file — summarising app’s structure, tech stack, and potential improvements.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Benchmark 5: Smart Planning Phase&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The smart planning phase helps build an application before taking any action. It presents a detailed “plan” outlining what it will build. You can approve or modify this — giving you total control, just like working with a teammate.&lt;/p&gt;

&lt;p&gt;It’s like having a junior developer who walks you through their approach before writing code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;V0:&lt;/strong&gt; It skips this stage and starts generating output directly from the given prompt or Figma input. While it’s fast, you often need several prompt iterations to align the output with your expectations.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://Builder.io" rel="noopener noreferrer"&gt;&lt;strong&gt;Builder.io&lt;/strong&gt;&lt;/a&gt;: It offers partial planning through its &lt;em&gt;component mapping&lt;/em&gt; step, where you define how Figma components connect to existing code. It’s useful, but more manual and setup-heavy any automatic planning phase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kombai:&lt;/strong&gt; Instead of rushing into generation, Kombai first asks for confirmation before making changesits an automatic system by default.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Benchmark 6: Responsiveness and Design Fidelity&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;V0&lt;/strong&gt;, on the other hand, focuses more on functional React/Tailwind output than pure design precision. It captures structure well but often requires post-generation adjustments to match the original Figma layout.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://Builder.io" rel="noopener noreferrer"&gt;&lt;strong&gt;Builder.io&lt;/strong&gt;&lt;/a&gt; delivers strong design accuracy when working with mapped components, but it sometimes simplifies layouts to maintain consistency with your design system.&lt;/p&gt;

&lt;p&gt;Kombai preserves the &lt;strong&gt;design fidelity&lt;/strong&gt; from Figma to code. Even typography, colour palettes, and animations carry over seamlessly.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Benchmark 7: Code Quality &amp;amp; Structure&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;V0&lt;/strong&gt; also generates solid and clean React + Tailwind code but leans heavily on its internal conventions, making customisation trickier. It also uses Shadcn component by default until explicitly asked to use something else&lt;br&gt;&lt;br&gt;
&lt;a href="http://Builder.io" rel="noopener noreferrer"&gt;&lt;strong&gt;Builder.io&lt;/strong&gt;&lt;/a&gt; prioritises no-code flexibility; while its code export is clean, it’s more suited for CMS-driven projects than heavy custom logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kombai&lt;/strong&gt;-generated code isn’t bloated or minified. It’s readable, clean, and production-grade — making handoff between design and dev smooth.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Benchmark 8: AI Agent Mode&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;V0&lt;/strong&gt; has a prompt-driven system too, but it’s less conversational and context-aware — it works well for isolated code generation, not project-level edits.&lt;br&gt;&lt;br&gt;
&lt;a href="http://Builder.io" rel="noopener noreferrer"&gt;&lt;strong&gt;Builder.io&lt;/strong&gt;&lt;/a&gt; is more rule-based, with minimal AI-driven modification features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kombai&lt;/strong&gt;: You can talk to it like an assistant — ask it to refactor files, add sections, or explain existing code.&lt;br&gt;&lt;br&gt;
It understands context and acts on real project data, not just prompt guesses.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Benchmark 9: Cross-Platform Vision&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;V0:&lt;/strong&gt; remains web-focused (optimised for React + Next.js).&lt;br&gt;&lt;br&gt;
&lt;a href="http://Builder.io" rel="noopener noreferrer"&gt;&lt;strong&gt;Builder.io&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; supports multiple frameworks (React, Angular, Vue) but stays primarily within the browser ecosystem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kombai&lt;/strong&gt; isn’t limited to web — it can also handle &lt;strong&gt;React Native&lt;/strong&gt;, making it a powerful tool for both web and mobile developers.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Target Audience&lt;/strong&gt;
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Kombai – For Developers Who Want AI &lt;em&gt;Inside the Codebase&lt;/em&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Best suited for frontend developers who want AI as a coding partner rather than just a design converter.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ideal if your workflow includes both &lt;strong&gt;design-to-code automation&lt;/strong&gt; and &lt;strong&gt;repository-level analysis&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Think of Kombai as an AI teammate that understands your project, not just your Figma design.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  V0 (by Vercel) – For Speed-Focused Frontend Developers
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Built for developers who want &lt;strong&gt;fast UI generation&lt;/strong&gt; without leaving Vercel’s ecosystem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Perfect for rapid prototyping or spinning up functional interfaces in minutes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If your focus is efficiency and integration with &lt;strong&gt;Next.js&lt;/strong&gt; workflows, V0 is a solid choice.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;a href="http://Builder.io" rel="noopener noreferrer"&gt;Builder.io&lt;/a&gt; – For Product and Marketing Teams
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Great for teams who need &lt;strong&gt;visual control&lt;/strong&gt; over design and content without diving deep into code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Works best when you want a no-code or low-code workflow that still respects your design system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ideal for marketers, designers, or PMs who want to update layouts and pages independently.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Feature Table&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I have built this table to show how the different tools perform on each benchmark. It will give you a complete idea about what’s going on&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Feature / Phase&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kombai&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;V0 (by Vercel)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://Builder.io" rel="noopener noreferrer"&gt;&lt;strong&gt;Builder.io&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setup &amp;amp; Integration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Direct VS Code extension for instant setup. • Connects with Figma &amp;amp; GitHub. • Auto-generates a &lt;em&gt;Plan Phase&lt;/em&gt; outlining build steps.&lt;/p&gt;

&lt;p&gt;• 100% web-based; paste Figma link or prompt. • Optimized for Next.js &amp;amp; Vercel deployment. • No local IDE setup required.&lt;/p&gt;

&lt;p&gt;• Drag-and-drop visual builder. • Integrates via SDKs/APIs for React, Angular, Vue. • Expansive plugin ecosystem for dev tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Figma-to-Code Workflow&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• One-click import of Figma design link. • Auto-fetches layouts inside VS Code agent. • Outputs pixel-perfect React or React Native components with responsive logic.&lt;/p&gt;

&lt;p&gt;• Converts Figma links or screenshots into React/Tailwind code. • Includes iterative AI refactoring.&lt;/p&gt;

&lt;p&gt;• Converts visual design blocks into reusable components. • Requires page mapping for deeper Figma code integration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live Preview / Sandbox&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Real-time &lt;em&gt;sandbox preview&lt;/em&gt; inside VS Code. • Updates instantly when code is modified.&lt;/p&gt;

&lt;p&gt;• Browser-based preview for Next.js environments. • Syncs with Vercel’s live deployment previews.&lt;/p&gt;

&lt;p&gt;• True WYSIWYG editor; visual changes reflected instantly. • Live sync with backend CMS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repo &amp;amp; Code Intelligence&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Performs full repo analysis. • Generates &lt;code&gt;PROJECT_&lt;/code&gt;&lt;a href="http://ANALYSIS.md" rel="noopener noreferrer"&gt;&lt;code&gt;ANALYSIS.md&lt;/code&gt;&lt;/a&gt; summarizing architecture. • Suggests structural and performance improvements.&lt;/p&gt;

&lt;p&gt;• Project-aware but limited repo insights. • Primarily focused on UI generation.&lt;/p&gt;

&lt;p&gt;• No code-level repo analysis. • CMS-focused integration instead of repository parsing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Quality &amp;amp; Structure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Clean, readable React code with proper naming conventions. • Modular, reusable components with prop management. • No minified or bloated output.&lt;/p&gt;

&lt;p&gt;• Auto-generated React/Tailwind code. • Readable but may require manual refinement.&lt;/p&gt;

&lt;p&gt;• Clean component bindings, but limited control beyond visual UI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI Assistance / Agent Mode&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Full conversational AI agent inside IDE. • Can refactor, modify, and explain code contextually. • Understands real project context.&lt;/p&gt;

&lt;p&gt;• Basic chat-style UI component generator. • Limited contextual awareness.&lt;/p&gt;

&lt;p&gt;• Minimal AI — primarily rule-based logic for layout generation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design Fidelity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Near pixel-perfect accuracy for typography, spacing, colour, and animation.&lt;/p&gt;

&lt;p&gt;• Medium fidelity; optimised for speed and developer control.&lt;/p&gt;

&lt;p&gt;• Visual-first; sometimes diverges from original Figma layouts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Responsiveness&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Auto-detects mobile breakpoints. • Generates adaptive layouts natively.&lt;/p&gt;

&lt;p&gt;• Supports responsive design with limited manual controls.&lt;/p&gt;

&lt;p&gt;• Fully responsive UI is possible but often requires tweaking.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cross-Platform Capability&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Supports both Web and React Native builds.&lt;/p&gt;

&lt;p&gt;• Web-focused (React + Next.js).&lt;/p&gt;

&lt;p&gt;• Web and CMS-powered apps (React, Angular, Vue).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Target Audience&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Developers who want &lt;em&gt;AI inside the codebase&lt;/em&gt;. • Ideal for design-to-code + repo analysis workflows.&lt;/p&gt;

&lt;p&gt;• Frontend developers who need &lt;em&gt;fast UI generation&lt;/em&gt; within Vercel’s ecosystem.&lt;/p&gt;

&lt;p&gt;• Product and marketing teams seeking &lt;em&gt;visual control&lt;/em&gt; with minimal coding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unique Differentiator&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Combines &lt;em&gt;agentic AI + repo intelligence + Figma-to-code&lt;/em&gt; in one continuous workflow.&lt;/p&gt;

&lt;p&gt;Deeply integrated with &lt;em&gt;Vercel’s hosting and deployment pipelines.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Highly visual &lt;em&gt;CMS-powered builder&lt;/em&gt; for content-driven sites.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Overall Verdict&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Developer-first approach that seamlessly merges Figma, repo analysis, and AI-assisted coding.&lt;/p&gt;

&lt;p&gt;Great for rapid prototyping and quick Next.js frontends.&lt;/p&gt;

&lt;p&gt;Best suited for designers and content teams needing flexible, visual control.&lt;/p&gt;

&lt;p&gt;I have also seen some areas where I think making small improvements will make this awesome tool better&lt;/p&gt;

&lt;h2&gt;
  
  
  A Few Areas to Improve
&lt;/h2&gt;

&lt;p&gt;Even though all the agents performed exceptionally, here are some things I noticed that can make all even better:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Figma Auth Flow:&lt;/strong&gt; Occasionally re-asks for connection; smoother OAuth handling would help.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tech Stack Memory:&lt;/strong&gt; Sometimes retains old stack choices — needs a clearer “Confirm Stack” UI.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Session Management:&lt;/strong&gt; The Ability to reset or switch projects quickly would streamline workflow.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are small usability fixes, not performance issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to give proper context and prompt to AI Agents/tools
&lt;/h2&gt;

&lt;p&gt;When I have to speak to masses on any topic, I always say one thing first, that “I am only responsible for what I speak, not for what you listen” by saying this, I make sure that people don’t get confused they hear and understands me clearly similar process is followed by AI tools as AI tools are trained on predefined data sets and to fetch the exact information or get any task done you will have to give clear instruction to any AI tool let tell me you a small story Imagine you’ve just met a super-intelligent assistant — an AI who can write, design, analyze, and even brainstorm ideas with you. But here’s the catch: this AI doesn’t read your mind. It only understands what you &lt;em&gt;say&lt;/em&gt;. So, if you want great results, you have to talk to it clearly — like explaining your idea to a teammate who’s brilliant but new to your project.&lt;/p&gt;

&lt;p&gt;That’s where the &lt;em&gt;art of giving the right prompt and context&lt;/em&gt; comes in.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Power of Context
&lt;/h3&gt;

&lt;p&gt;Think of &lt;em&gt;context&lt;/em&gt; as the background story. Without it, the AI is like a painter who doesn’t know what scene you want.&lt;/p&gt;

&lt;p&gt;To give the right context, you can do a few things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Define roles:&lt;/strong&gt; Tell the AI who you are and what role you want it to play.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For example: “You’re a marketing expert helping me write a blog post.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;State your goal:&lt;/strong&gt; Explain &lt;em&gt;why&lt;/em&gt; you’re asking.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Are you trying to get information, write an article, or brainstorm ideas?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add details:&lt;/strong&gt; Give as much background as possible — facts, examples, or the situation you’re dealing with.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Identify your audience:&lt;/strong&gt; Let the AI know who will read or use the final output.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Is it for professionals, everyday readers, or kids?&lt;br&gt;&lt;br&gt;
This helps the AI choose the right tone and vocabulary.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Craft of a Prompt
&lt;/h3&gt;

&lt;p&gt;Once your context is set, the &lt;em&gt;prompt&lt;/em&gt; is your actual instruction — the “what to do.”&lt;/p&gt;

&lt;p&gt;Here’s how to make it powerful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Be clear and specific:&lt;/strong&gt; Avoid vague or complicated sentences. Use straightforward language.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Break it down:&lt;/strong&gt; If your task is big, divide it into steps.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Like: “First do this, then that, and finally summarize.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Show examples:&lt;/strong&gt; Demonstrate what kind of result you’re expecting.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Set tone and format:&lt;/strong&gt; Tell the AI how to reply — formal, friendly, or creative — and in what format — list, paragraph, or table.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Set limits:&lt;/strong&gt; Mention what you &lt;em&gt;don’t&lt;/em&gt; want in the answer, so it stays focused.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  A Quick Example
&lt;/h3&gt;

&lt;p&gt;Let’s see the difference between a weak prompt and a strong one.&lt;/p&gt;

&lt;p&gt;❌ &lt;strong&gt;Weak Prompt:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Tell me something about history.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;✅ &lt;strong&gt;Improved Prompt:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Role: “You’re a history professor.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Context: “I’m preparing a presentation for college students.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Goal: “I need a summary of the main causes and results of World War II.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Format: “The information should be in bullet points.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tone: “Keep it simple and easy to understand.”&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✅ &lt;strong&gt;Best Prompt (all in one):&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“You’re a history professor, and I’m creating a presentation for college students about World War II. Please give me a brief summary of the major causes and outcomes of the war in bullet points, using clear and easy-to-understand language.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://www.freecodecamp.org/news/become-a-full-stack-developer-and-get-a-job/#heading-q-amp-a" rel="noopener noreferrer"&gt;Q&amp;amp;A&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;How much experience do I have with tech and AI tools?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve been a software engineer for several years, working across multiple technologies and building products for a variety of domains. My journey with AI started back in college, where my final-year project focused on AI. Since then, I’ve been exploring AI tools extensively, testing their capabilities, and leveraging them to deliver projects efficiently within tight timelines. So yes—I have practical experience and a solid understanding of AI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Methodology &amp;amp; Disclosure&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
For fairness, I used one common Figma design (linked above) and the same control prompt across tools where possible. I performed &lt;strong&gt;hands-on testing with Kombai, V0 and Builder.io&lt;/strong&gt; (VS Code extension) and captured live previews, generated components, and repo analysis artefacts (screenshots in the demo gallery).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Responsible use of AI in code generation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While AI accelerates design-to-code workflows, developers must still review generated outputs for maintainability, accessibility, and long-term performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why am I writing about Frontend AI tools?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is an important question. Being a frontend developer myself for 5 years, I have had the opportunity to work with all the top tools like Figma, Adobe XD and Canva, etc, for designing applications. As I am a developer, I had to convert the designs into working code now, since AI is dominating everywhere. I had the chance to automate my design to code work using AI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s my experience with AI tools?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From my experience, I’ve been using tools like Kombai, V0, Builder.io, Replit and Cursor for my development workflow; all have worked well, but sometimes they break or make something I never asked them to do. The type of work decides the type of tool, like for backend, Cursor is good, and for frontend, Kombai, which is what I am working on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s the code quality produced by the Tools?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The code quality is impressive. I’ve deployed multiple frontend projects generated by such agents for clients, and after rigorous reviews, no client has reported UI/UX issues. Everything works smoothly and reliably.&lt;/p&gt;

&lt;p&gt;Most of the frontend code is safe until it throws a bug, but still, I prefer to do a rigorous code review for frontend and backend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How can I get AI tools for testing?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It’s simple: visit the respective website of the tools and do a simple sign-up. Most of the tools have free AI credit limits.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://www.freecodecamp.org/news/become-a-full-stack-developer-and-get-a-job/#heading-final-notes" rel="noopener noreferrer"&gt;Final Notes&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Using AI to accelerate your work is a valuable skill—but relying on it entirely can backfire. When AI starts hallucinating or fails to deliver exactly what you need, the responsibility falls on you to fix it and reach the desired outcome.&lt;/p&gt;

&lt;p&gt;Frontend development, in particular, can be challenging. Before using any AI tool to complete a task, make sure you understand the fundamentals of the technology and your chosen stack. This knowledge is often underrated but incredibly useful in the long run.&lt;/p&gt;

&lt;p&gt;In this blog, I’ve shared what I’ve found most helpful while working with Frontend AI tools. The market is full of high-level solutions from tech giants, but many emerging tools are delivering top-notch results, competing at the same level and sometimes even surpassing big names.&lt;/p&gt;

&lt;p&gt;AI won’t take your job—but a developer with AI skills certainly will.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://www.freecodecamp.org/news/become-a-full-stack-developer-and-get-a-job/#heading-conclusion" rel="noopener noreferrer"&gt;Conclusion&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;In practice, these tools free up hours of manual layout work — but they don’t replace developer judgment. They accelerate the repetitive parts so you can focus on logic, architecture, and user experience, where developers can focus on building good projects, not hustling to copy and paste CSS from Figma to the IDE.&lt;/p&gt;

&lt;p&gt;I wrote this blog to educate about how different tools are available in the market and how you can make the best use of those tools. I have even introduced a long benchmarking guide for developers so that next time, when they have to choose an AI tool for anything how they know how to proceed and using the right tool is more important than chasing 10 different tools.&lt;/p&gt;

&lt;p&gt;In my next blog, I will be writing more about something new I have been working on for a long time, and I am contributing to it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design+ AI + Development = The Ultimate Developer Stack 🔥&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By mastering these skills, you can turn any idea into a real-world product, secure high-paying jobs, and even start your tech venture.&lt;/p&gt;

&lt;p&gt;Now it's your turn—what are you building next? Let me know in the comments or DM me! 👇&lt;/p&gt;

&lt;p&gt;That’s all from my side. If you found this article helpful, feel free to share it and connect with me. I’m always open to new opportunities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Follow me on &lt;strong&gt;𝕏&lt;/strong&gt;: &lt;a href="https://x.com/prankurpandeyy" rel="noopener noreferrer"&gt;Prankur's&lt;/a&gt; &lt;strong&gt;𝕏&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Connect with me on LinkedIn: &lt;a href="https://linkedin.com/in/prankurpandeyy" rel="noopener noreferrer"&gt;Prankur's LinkedIn&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follow me on GitHub: &lt;a href="https://github.com/prankurpandeyy" rel="noopener noreferrer"&gt;Prankur’s Github&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follow me on Upstaff: &lt;a href="https://upstaff.com/profile/600-257-564" rel="noopener noreferrer"&gt;Prankur Pandey&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;View my Portfolio: &lt;a href="https://prankurpandeyy.netlify.app/" rel="noopener noreferrer"&gt;Prankur's Portfolio&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>frontend</category>
      <category>javascript</category>
      <category>designcode</category>
    </item>
    <item>
      <title>12 Minutes to Master React: All the Concepts You Need to Know</title>
      <dc:creator>PRANKUR PANDEY</dc:creator>
      <pubDate>Sat, 14 Sep 2024 13:34:43 +0000</pubDate>
      <link>https://dev.to/prankurpandeyy/every-react-concept-explained-in-12-minutes-4bif</link>
      <guid>https://dev.to/prankurpandeyy/every-react-concept-explained-in-12-minutes-4bif</guid>
      <description>&lt;h3&gt;
  
  
  &lt;strong&gt;Ever felt overwhelmed by the jargon in React?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Terms like reconciliation, composition, and error boundaries can sound like a foreign language. Don’t worry—let’s demystify React together. Whether you're just starting out or need a refresher, this guide will break down React's core concepts in a way that's easy to understand.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Intro: The React Wonderland&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;React is a powerhouse JavaScript library with a lot of fancy terminology. But what do these terms really mean? We’ll start at the very beginning and build up our React knowledge step by step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbn04u6hhv2pats1xo0mq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbn04u6hhv2pats1xo0mq.png" alt="Image description"&gt;&lt;/a&gt;---&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Components: The Building Blocks&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Think of components as the LEGO pieces of your React app. These are the fundamental building blocks that make up everything visible, from buttons to entire pages.&lt;/p&gt;

&lt;p&gt;Here’s a simple React component:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Click Me!&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;JSX: JavaScript in Disguise&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;React components don’t return plain HTML; they return JSX, which stands for JavaScript XML. JSX is a syntax extension that looks like HTML but is actually JavaScript in disguise.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Hello, World!&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;This is JSX!&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F626paedcw3lzmsrjifmq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F626paedcw3lzmsrjifmq.png" alt="Image description"&gt;&lt;/a&gt; &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Curly Braces: Dynamic Magic&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One of React’s magic tricks is the use of curly braces &lt;code&gt;{}&lt;/code&gt; in JSX. You can insert dynamic JavaScript values directly into your JSX.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;John&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Hello, &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;!&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh2tohkqa8rowgpw6lj42.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh2tohkqa8rowgpw6lj42.png" alt="Image description"&gt;&lt;/a&gt; &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Fragments: Avoiding Extra Elements&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In React, a component can only return one parent element. If you need multiple elements, you can wrap them in a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;. To avoid unnecessary HTML elements, use React Fragments &lt;code&gt;(&amp;lt;&amp;gt;&amp;lt;/&amp;gt;)&lt;/code&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Title&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Description&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofdtm2pd0or1fxvgbn65.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofdtm2pd0or1fxvgbn65.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Props: Passing Data Like a Pro&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Props allow you to pass data to components, making them dynamic and reusable.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Welcome&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Hello, &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Welcome&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Alice"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr4qnvtfrxt53tpdgbifg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr4qnvtfrxt53tpdgbifg.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Children: Components Inside Components&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You can pass other components as props using the &lt;code&gt;children&lt;/code&gt; prop.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Wrapper&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Wrapper&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Nested Content&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Wrapper&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2umcng6gur8a66s5nqil.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2umcng6gur8a66s5nqil.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Keys: Unique Identifiers&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When rendering lists, React needs to uniquely identify each item using the &lt;code&gt;key&lt;/code&gt; prop.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Apple&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Banana&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Cherry&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;ul&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;ul&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fipt2cry8vswq03miwn6e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fipt2cry8vswq03miwn6e.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Rendering: Making Your Code Visible&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Rendering turns your React code into a viewable app using the Virtual DOM, which updates only what’s necessary.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3iazt26tz79n0zr9cfv4.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3iazt26tz79n0zr9cfv4.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Event Handling: Reacting to User Actions&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;React handles user interactions through events like &lt;code&gt;onClick&lt;/code&gt; and &lt;code&gt;onChange&lt;/code&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handleClick&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Button clicked!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleClick&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Click Me!&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsc11mj1m4v22r8t58s44.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsc11mj1m4v22r8t58s44.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;State: Keeping Track of Changes&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;State allows React to track changes in your app. You can manage state using the &lt;code&gt;useState&lt;/code&gt; hook.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;You clicked &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; times&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Click me&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe3ckkl4fjs5h5lbrdbah.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe3ckkl4fjs5h5lbrdbah.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Controlled Components: Predictable Behavior&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Controlled components ensure form elements’ values are managed by React state.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setValue&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;onChange&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9qsvt47nr7brx5jb3bxv.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9qsvt47nr7brx5jb3bxv.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Hooks: The Power of Function Components&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Hooks like &lt;code&gt;useState&lt;/code&gt;, &lt;code&gt;useEffect&lt;/code&gt;, and &lt;code&gt;useRef&lt;/code&gt; provide state management and side effects in functional components.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Component Mounted&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuups3vk7t8h2381g23px.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuups3vk7t8h2381g23px.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Purity: Consistent Outputs&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;A pure component always returns the same output for the same input. This predictability ensures fewer bugs.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;PureComponent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Hello, &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Strict Mode: Catching Errors Early&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;React’s Strict Mode helps you catch potential problems early in the development cycle.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;StrictMode&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;App&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;StrictMode&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Effects: Interacting with the Outside World&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;useEffect&lt;/code&gt; hook lets you handle side effects like data fetching.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/api/data&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqgd0gkx01gc21btr1cv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqgd0gkx01gc21btr1cv.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Refs: Direct DOM Access&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Refs let you interact directly with DOM elements when necessary.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;inputRef&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useRef&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;focusInput&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;inputRef&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;focus&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="na"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;inputRef&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Context: Sharing Data Across Components&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;React Context provides a way to share data across components without prop drilling.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;UserContext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;UserContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Provider&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;UserContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Provider&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Portals: Rendering Outside the DOM Hierarchy&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Portals let you render components outside of the parent component's hierarchy.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="nx"&gt;ReactDOM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createPortal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Modal Content&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;,&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;modal-root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Suspense: Handling Asynchronous Data&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Suspense helps in rendering fallback UI while waiting for async data to load.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Suspense&lt;/span&gt; &lt;span class="na"&gt;fallback&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Loading...&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;AsyncComponent&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Suspense&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Error Boundaries: Graceful Error Handling&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Error Boundaries catch JavaScript errors and display fallback UIs, preventing app crashes.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ErrorBoundary&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;hasError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="nf"&gt;getDerivedStateFromError&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;hasError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hasError&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Something went wrong.&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;p&gt;By understanding these core concepts, you can dive deeper into the React ecosystem and build sophisticated web applications!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusions&lt;/strong&gt;&lt;br&gt;
Hope I cleared all your doubts about the React JS and its basic principles,Tell in comments which you liked the most.&lt;br&gt;
You can connect with me here: &lt;a href="https://linkedin.com/in/prankurpandeyy" rel="noopener noreferrer"&gt;LINKEDIN&lt;/a&gt;&lt;br&gt;
&lt;a href="https://x.com/prankurpandeyy" rel="noopener noreferrer"&gt;TWITTER&lt;/a&gt; &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>From Zero to Hero: Build Your First React Native App in 1 Hour</title>
      <dc:creator>PRANKUR PANDEY</dc:creator>
      <pubDate>Mon, 02 Sep 2024 16:24:00 +0000</pubDate>
      <link>https://dev.to/prankurpandeyy/step-by-step-tutorial-to-build-first-react-native-app-19g9</link>
      <guid>https://dev.to/prankurpandeyy/step-by-step-tutorial-to-build-first-react-native-app-19g9</guid>
      <description>&lt;h3&gt;
  
  
  1. &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Overview of React Native&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What is React Native?&lt;br&gt;
React Native is a JavaScript framework for building mobile apps for Android and iOS It is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cross-platform: React Native allows developers to create platform-specific versions of components and use the same codebase for both iOS and Android.&lt;/li&gt;
&lt;li&gt;Native components: React Native uses native components instead of web components.&lt;/li&gt;
&lt;li&gt;Efficient and versatile: React Native is designed to create apps that are responsive and intuitive.&lt;/li&gt;
&lt;li&gt;Based on React: React Native is based on React, Facebook's JavaScript library for building user interfaces.&lt;/li&gt;
&lt;li&gt;Supports new JavaScript features:React Native supports new JavaScript (ES6+) features, such as arrow functions and async/await.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why use React Native for mobile development?&lt;/strong&gt;&lt;br&gt;
If you are coming from React and JavaScript Background it is pretty easy to pick up React Native , you do not have to learn Java or Kotlin to build Android Apps and Swift for the iOS apps.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vast library support makes React Native easy to integrate with third party libraries to get the job done.&lt;/li&gt;
&lt;li&gt;Huge community support so if you are stuck at something you can ask to the community.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic knowledge of JavaScript and React.&lt;/li&gt;
&lt;li&gt;Development environment setup (Windows, macOS, Linux).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Setting Up the Development Environment&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Installing Node.js&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Based on the OS the NodeJS provide different binaries you go to the nodejs official website and download the binaries once downloaded you can install it easily.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Installing JDK&lt;/strong&gt;- Install JDK from official JAVA website or you can also choose any JDK of your choice, the version should be above 17&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Installing React Native CLI&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Introduction to React Native CLI vs Expo CLI.
React Native apps can be build with two methods one is standard React Native CLI and another is Expo CLI ,expo provides many things preconfigured for the development which you will have to do separately in React Native CLI ,so making apps with expo is bit easy also if you are building with expo you don't need to attach a physical mobile device with development machine expo will give the QR just scan the QR Code with expo go app installed on the phone and you are good to go.&lt;/li&gt;
&lt;li&gt;Here are the commands for Installing expo CLI                                                                             :&lt;code&gt;npm install --global expo-cli.&lt;/code&gt;  global is used to install the CLI globally on machine&lt;/li&gt;
&lt;li&gt;Here are the commands for Installing React Native CLI
: &lt;code&gt;npx @react-native-community/cli@latest&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Setting Up Android Studio (for Android Development)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download Android Studio&lt;/li&gt;
&lt;li&gt;Once Android Studio is installed run the Studio and when first time setup occurs check these boxes and click on apply/install&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Android SDK&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Android SDK Platform&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Android Virtual Device&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Setting Up Home Environemnt (for Android Development)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set Java Home Path&lt;/li&gt;
&lt;li&gt;Set Android Home Path&lt;/li&gt;
&lt;li&gt;Set Android SDK Path&lt;/li&gt;
&lt;li&gt;Set Android Emulator Path&lt;/li&gt;
&lt;li&gt;Set Android Paltform Tools Path
I am using Linux so after setting up everything in my bash file it looks something like this&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fadzyx2qpyezh2q3q02aa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fadzyx2qpyezh2q3q02aa.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
    Save the file and restart the system if everything goes well the environment setup is done.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Creating Your First React Native Project&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Starting a New Project&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Command to create a new React Native project.
Run This command in terminal :&lt;code&gt;npx @react-native-community/cli@latest init myApp&lt;/code&gt;Run this command and It will generate a new react native project with the name of myApp here is how it looks like after creating project&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fye8nnpmvajd6kthli5yn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fye8nnpmvajd6kthli5yn.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Explanation of the project structure.&lt;/p&gt;

&lt;p&gt;We have multiple folders but I will only focus on important ones,  lets understand each folder:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Android&lt;/strong&gt; : This folder contains android related files such as gradle builds,minmap file responsible for android logo updation etc.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;App.tsx&lt;/strong&gt; : This file holds your whole project anything which holds project data such as pages,components,images can be hold here .&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;package.json&lt;/strong&gt; : This is responsible for handling packages/libraries installed as third party in project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;index.js&lt;/strong&gt; : the file serve as root for the project ,when projects run the builder looks for this file only.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;test&lt;/em&gt;&lt;/strong&gt;: the file holds test cases for the project&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Running the Project on an Emulator/Device&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;I am building the application for the Android so you need an Android Phone and enable USB debugging then connect your phone to the machine and run this command in terminal where your React Native Project is located run this command :  &lt;code&gt;npm start&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxinlc6q190ey14sjt247.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxinlc6q190ey14sjt247.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
It will launch the app on your phone something like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw40ptt71fl72cii6ymsn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw40ptt71fl72cii6ymsn.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After launching the app you can see a dummy mobile phone appears it is emulator, therefore we have previously configured Android Home and Emulator tools path.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  4.&lt;strong&gt;Understanding the Basics of React Native&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Core Components&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;In React Native there are various components and each component has It own uses today I will be discussing about the few main components which I will using in building this project

&lt;ul&gt;
&lt;li&gt;Explanation and examples of &lt;code&gt;View&lt;/code&gt;, &lt;code&gt;Text&lt;/code&gt;, &lt;code&gt;Image&lt;/code&gt;, &lt;code&gt;TextInput&lt;/code&gt;, &lt;code&gt;Button&lt;/code&gt; :&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;View :&lt;/strong&gt; The View component is main components in React Native responsible for displaying anything you can consider this as div of html.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Text :&lt;/strong&gt; The Text component is responsible for displaying text like we have paragraphs,heading in html and we have different tags to do this but in React Native to display simple text ,the Text component is used .&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Image :&lt;/strong&gt; The Image component is same as the Image component of HTML.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Text Input :&lt;/strong&gt; The Text Input component is responsible for taking text as input consider this component as text input component of HTML.
-** Button :** The Button component is same as the Button component of HTML.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Styling in React Native&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;How to style components using &lt;code&gt;StyleSheet&lt;/code&gt; :
In React Native there are two ways to style components first is inline styling and another is using Stylesheet.,stylesheet takes objects as styles for different style names for each component.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Using libraries for styling :&lt;/strong&gt;
There are multiple component libraries available in market and each has its own unique components and features libraries work like plug and play working model simply install the library and start importing components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexbox layout for responsive design:&lt;/strong&gt;
To Achieve responsive design in React Native flexbox is availble ,this flexbox works same as the flexbox of vanilla CSS ,even most of the styles of CSS can be declared and used in React Native.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Handling User Input&lt;/strong&gt;
User input can be handles same as we handle in react using event handlers.&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. &lt;strong&gt;State Management in React Native&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Using the &lt;code&gt;useState&lt;/code&gt; Hook&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In JavsScript if we have to hold the datawe use variables in variables we have three variable methods to do it ,&lt;strong&gt;let,var and const&lt;/strong&gt; these are three data holding points but in React we have hooks like useState to hold the data and use it when needed , same goes for React Native the &lt;code&gt;useState&lt;/code&gt; hook of React works in same way it works in ReactJS.
Here is an example :
```
import React, { useState } from 'react';
import './App.css';&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;function App() {&lt;br&gt;
  // Step 3: Using useState Hook to handle state&lt;br&gt;
  const [count, setCount] = useState(0); //storing data in count variable&lt;/p&gt;

&lt;p&gt;// Step 4: Increment and Decrement Functions&lt;br&gt;
  const increment = () =&amp;gt; {&lt;br&gt;
    setCount(count + 1);&lt;br&gt;
  };&lt;/p&gt;

&lt;p&gt;const decrement = () =&amp;gt; {&lt;br&gt;
    setCount(count - 1);&lt;br&gt;
  };&lt;/p&gt;

&lt;p&gt;return (&lt;br&gt;
    &lt;/p&gt;


&lt;h1&gt;Simple Counter App&lt;/h1&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    {/* Step 5: Displaying the Count */}
    &amp;lt;p&amp;gt;Count: {count}&amp;lt;/p&amp;gt;

    {/* Step 6: Buttons to Increment and Decrement */}
    &amp;lt;button onClick={increment}&amp;gt;Increment&amp;lt;/button&amp;gt;
    &amp;lt;button onClick={decrement}&amp;gt;Decrement&amp;lt;/button&amp;gt;
  &amp;lt;/header&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;export default App;&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Data and Component Communication&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data handling is very crucial in every application and supply of data should be consistent in whole application to do this in React Native we can apply same data logic which we use in React like using of states for holding data and later supplying it into the whole app.&lt;/li&gt;
&lt;li&gt;Supply of data in whole app is challenging as there are methods and libraries to do it using like redux,zod etc and there are native methods like ContextAPI and Reducers .If the app size is small we can also use prop dirilling to pass the data .&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;h3&gt;
  
  
  6. &lt;strong&gt;Working with APIs&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Fetching Data from an API&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Introduction to &lt;code&gt;fetch&lt;/code&gt; and &lt;code&gt;axios&lt;/code&gt;.&lt;/strong&gt;
Data fetching is most part in applications as it abstract the backend without exposing business logic,As there are two methods which I personally prefer using for data fetching one is &lt;strong&gt;Axios&lt;/strong&gt; and another is native browser methods &lt;strong&gt;Fetch&lt;/strong&gt;
Axios is a third party library built on top of fetch ,fetch is native method of browsers allows data fetching from api url but due to its some limitations and handling of complex HTTP request is bit tricky axios is more popularalso fetch doesn't transform json data while axios does.
Also error handling is easy in axios compare to Fetch.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  7. &lt;strong&gt;Building the React Native App&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What I am building&lt;/strong&gt;
I am building a simple React Native Android App where users will get the news every time they click on fetch news button.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tech Stack&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;React Native&lt;/li&gt;
&lt;li&gt;Axios&lt;/li&gt;
&lt;li&gt;News API&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Screens&lt;/strong&gt;
First I will be building the sample homepage for the app which looks something like this&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ydffu4qvbokjw4v7t6x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ydffu4qvbokjw4v7t6x.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the full code of building screens :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;```
import React, {useState} from 'react';
import {View, Text, Button, StyleSheet, ActivityIndicator} from 'react-native';
import axios from 'axios';&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;const Homepage = () =&amp;gt; {&lt;br&gt;
    const [news, setNews] = useState(null);&lt;br&gt;
    const [loading, setLoading] = useState(false);&lt;br&gt;
    const [error, setError] = useState(null);&lt;/p&gt;

&lt;/ul&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fetchNews = () =&amp;gt; {
  // Set the loading indicator to true and clear out any error messages.
  setLoading(true);
  setError(null);

  // Make a GET request to the News API. We'll pass in some parameters to
  // customize the request. The country parameter is set to the US, but you can
  // change this to any other country code supported by the API.
  // The apiKey parameter is set to your API key that you got when you signed
  // up for the News API.
  // The pageSize parameter is set to 1, which means that we'll only get one
  // article back. If you want to get more articles, just increase this number.
  // Finally, the page parameter is set to a random number between 1 and 100.
  // This is just to make sure that we don't always get the same article.
  axios
    .get('https://newsapi.org/v2/top-headlines', {
      params: {
        country: 'us',
        apiKey: '8e7c1fc79b26406d87a58370170b37a9',
        pageSize: 1,
        page: Math.floor(Math.random() * 100) + 1,
      },
    })
    .then(response =&amp;gt; {
      // If the request was successful, set the news to the first article in the
      // response. The response is an object with an articles array in it, which
      // contains the articles.
      setNews(response.data.articles[0]);
      // Set the loading indicator to false, since we're done fetching the data.
      setLoading(false);
    })
    .catch(error =&amp;gt; {
      // If the request failed, set the error message to an error message.
      setError('Failed to fetch news');
      // Set the loading indicator to false, since we're done trying to fetch
      // the data.
      setLoading(false);
    });
};

return (
  &amp;lt;View style={styles.container}&amp;gt;
    {loading &amp;amp;&amp;amp; &amp;lt;ActivityIndicator size="large" style={styles.loading} /&amp;gt;}

    {!loading &amp;amp;&amp;amp; !news &amp;amp;&amp;amp; !error &amp;amp;&amp;amp; (
      &amp;lt;Text style={styles.message}&amp;gt;Click on the button to fetch news&amp;lt;/Text&amp;gt;
    )}

    {error &amp;amp;&amp;amp; &amp;lt;Text style={styles.error}&amp;gt;{error}&amp;lt;/Text&amp;gt;}
    &amp;lt;View style={styles.dataContainer}&amp;gt;
      {news &amp;amp;&amp;amp; (
        &amp;lt;View style={styles.newsContainer}&amp;gt;
          &amp;lt;Text style={styles.description}&amp;gt;Author: {news.author}&amp;lt;/Text&amp;gt;
          &amp;lt;Text style={styles.title}&amp;gt;News : {news.title}&amp;lt;/Text&amp;gt;
        &amp;lt;/View&amp;gt;
      )}
      &amp;lt;Button title="Fetch News" onPress={fetchNews} /&amp;gt;
    &amp;lt;/View&amp;gt;
  &amp;lt;/View&amp;gt;
);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;};&lt;/p&gt;

&lt;p&gt;const styles = StyleSheet.create({&lt;br&gt;
    container: {&lt;br&gt;
      flex: 1,&lt;br&gt;
      justifyContent: 'center',&lt;br&gt;
      alignItems: 'center',&lt;br&gt;
      height: 300,&lt;br&gt;
      width: 300,&lt;br&gt;
    },&lt;br&gt;
    loading: {&lt;br&gt;
      position: 'absolute',&lt;br&gt;
      top: 0,&lt;br&gt;
      left: 0,&lt;br&gt;
      right: 0,&lt;br&gt;
      bottom: 0,&lt;br&gt;
    },&lt;br&gt;
    message: {&lt;br&gt;
      fontSize: 20,&lt;br&gt;
    },&lt;br&gt;
    error: {&lt;br&gt;
      fontSize: 20,&lt;br&gt;
      color: 'red',&lt;br&gt;
    },&lt;br&gt;
    newsContainer: {&lt;br&gt;
      alignItems: 'center',&lt;br&gt;
      flex: 1,&lt;br&gt;
      justifyContent: 'center',&lt;br&gt;
      backgroundColor: 'blue',&lt;br&gt;
      padding: 20,&lt;br&gt;
      borderRadius: 10,&lt;br&gt;
      borderWidth: 1,&lt;br&gt;
      borderColor: 'black',&lt;br&gt;
      marginTop: 10,&lt;br&gt;
    },&lt;br&gt;
    title: {&lt;br&gt;
      fontSize: 20,&lt;br&gt;
      fontWeight: 'bold',&lt;br&gt;
    },&lt;br&gt;
    description: {&lt;br&gt;
      fontSize: 18,&lt;br&gt;
      color: 'black',&lt;br&gt;
    },&lt;br&gt;
    dataContainer: {&lt;br&gt;
      flex: 1,&lt;br&gt;
      justifyContent: 'center',&lt;br&gt;
      alignItems: 'center',&lt;br&gt;
      width: 300,&lt;br&gt;
      height: 300,&lt;br&gt;
      marginTop: 10,&lt;br&gt;
    },&lt;br&gt;
    button: {&lt;br&gt;
      marginTop: 10,&lt;br&gt;
    },&lt;br&gt;
  });&lt;/p&gt;

&lt;p&gt;export default Homepage;&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Explanation of this code : 


This code is a React Native component called `Homepage` that fetches a news article from the News API and displays it when the user clicks a "Fetch News" button. Here's a detailed breakdown:

### **Imports**

```javascript
import React, { useState } from 'react';
import { View, Text, Button, StyleSheet, ActivityIndicator } from 'react-native';
import axios from 'axios';
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React&lt;/strong&gt;: Core library for building user interfaces.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;useState&lt;/strong&gt;: A React hook that allows you to manage state in functional components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;View, Text, Button, StyleSheet, ActivityIndicator&lt;/strong&gt;: Core components from React Native to build the UI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;axios&lt;/strong&gt;: A promise-based HTTP client for making requests to a server.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;State Management&lt;/strong&gt;
&lt;/h3&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;news&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setNews&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setError&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;news&lt;/strong&gt;: Stores the fetched news article.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;loading&lt;/strong&gt;: A boolean that tracks whether the app is currently fetching data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;error&lt;/strong&gt;: Stores an error message if the API request fails.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;fetchNews Function&lt;/strong&gt;
&lt;/h3&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fetchNews&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nf"&gt;setError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nx"&gt;axios&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://newsapi.org/v2/top-headlines&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;country&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;us&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;8e7c1fc79b26406d87a58370170b37a9&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;pageSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;page&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;setNews&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;articles&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
      &lt;span class="nf"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;setError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Failed to fetch news&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nf"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;setLoading(true)&lt;/strong&gt;: Activates the loading state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;axios.get()&lt;/strong&gt;: Makes a GET request to the News API.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;params&lt;/strong&gt;: Specifies the request parameters:&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;country&lt;/code&gt;: Fetches news from the US.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;apiKey&lt;/code&gt;: Your API key for accessing the News API.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pageSize&lt;/code&gt;: Limits the response to one article.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;page&lt;/code&gt;: Fetches a random page to ensure different articles are fetched each time.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;setNews(response.data.articles[0])&lt;/strong&gt;: Stores the first article from the response.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;setLoading(false)&lt;/strong&gt;: Deactivates the loading state.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;setError('Failed to fetch news')&lt;/strong&gt;: Sets an error message if the request fails.&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Rendering the UI&lt;/strong&gt;
&lt;/h3&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;View&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;container&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ActivityIndicator&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;large&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;}
&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;news&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Text&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Click&lt;/span&gt; &lt;span class="nx"&gt;on&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;fetch&lt;/span&gt; &lt;span class="nx"&gt;news&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Text&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;)}&lt;/span&gt;

    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Text&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Text&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;}
&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;View&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;dataContainer&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;news&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;View&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;newsContainer&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Text&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;Author&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;news&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;author&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Text&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Text&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;News&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;news&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Text&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/View&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="p"&gt;)}&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Fetch News&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;onPress&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;fetchNews&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/View&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/View&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ActivityIndicator&lt;/strong&gt;: Displays a loading spinner when &lt;code&gt;loading&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Message&lt;/strong&gt;: Displays "Click on the button to fetch news" if no news is fetched yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error Message&lt;/strong&gt;: Displays an error message if the API request fails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;News Container&lt;/strong&gt;: Displays the fetched news article's author and title.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Button&lt;/strong&gt;: Triggers the &lt;code&gt;fetchNews&lt;/code&gt; function when pressed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Styling&lt;/strong&gt;
&lt;/h3&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;StyleSheet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;container&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;justifyContent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;alignItems&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;absolute&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;newsContainer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;alignItems&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;justifyContent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;blue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;borderRadius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;borderWidth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;borderColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;black&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;marginTop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;fontWeight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bold&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;black&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;dataContainer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;justifyContent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;alignItems&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;marginTop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;button&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;marginTop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;container&lt;/strong&gt;: Centers the content and restricts the view size to 300x300.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;loading&lt;/strong&gt;: Centers the &lt;code&gt;ActivityIndicator&lt;/code&gt; over the entire screen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;message&lt;/strong&gt;: Styles the initial message text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;error&lt;/strong&gt;: Styles the error message in red.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;newsContainer&lt;/strong&gt;: Styles the news container with centered content, padding, and a blue background.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;title&lt;/strong&gt; and &lt;strong&gt;description&lt;/strong&gt;: Styles for the news title and description text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;dataContainer&lt;/strong&gt;: Centers and contains the fetched news and button.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Exporting the Component&lt;/strong&gt;
&lt;/h3&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Homepage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Exports the &lt;code&gt;Homepage&lt;/code&gt; component as the default export so it can be used in other parts of the application.
After making this page I imported it into my &lt;strong&gt;app&lt;/strong&gt; page like this, app page in react and react native works similar as it abstracts the main &lt;strong&gt;index.js&lt;/strong&gt; file which runs the whole application.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This code sets up the main entry point for a React Native application. It imports and uses a &lt;code&gt;Homepage&lt;/code&gt; component within a scrollable view, applying specific styles to position and center the content.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Imports&lt;/strong&gt;
&lt;/h3&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;View&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ScrollView&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;StyleSheet&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-native&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Homepage&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./Pages/Homepage&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;View, Text, ScrollView, StyleSheet&lt;/strong&gt;: Core components and utilities from React Native.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;View&lt;/strong&gt;: A container component that can hold other components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Text&lt;/strong&gt;: A component for displaying text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ScrollView&lt;/strong&gt;: A container that allows you to scroll through its child components if they exceed the screen size.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;StyleSheet&lt;/strong&gt;: A utility for defining component styles in a clean, organized way.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;React&lt;/strong&gt;: The core library for building user interfaces.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Homepage&lt;/strong&gt;: A custom component that is imported from a local file (&lt;code&gt;./Pages/Homepage&lt;/code&gt;).&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;App Component&lt;/strong&gt;
&lt;/h3&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ScrollView&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;View&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;container&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Homepage&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/View&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ScrollView&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;App&lt;/strong&gt;: A functional component that serves as the root component of the application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ScrollView&lt;/strong&gt;: Wraps the content of the app in a scrollable container, which is useful if the content exceeds the screen height. This allows users to scroll to view all content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;View&lt;/strong&gt;: A container that holds the &lt;code&gt;Homepage&lt;/code&gt; component. The &lt;code&gt;View&lt;/code&gt; is styled using the &lt;code&gt;styles.container&lt;/code&gt; object.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Homepage&lt;/strong&gt;: The custom component imported earlier, which is rendered inside the &lt;code&gt;View&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Styles&lt;/strong&gt;
&lt;/h3&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;StyleSheet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;container&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;justifyContent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;alignItems&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;marginTop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;marginLeft&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;container&lt;/strong&gt;: An object containing styles applied to the &lt;code&gt;View&lt;/code&gt; component wrapping the &lt;code&gt;Homepage&lt;/code&gt; component.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;flex: 1&lt;/strong&gt;: Makes the container take up the available space on the screen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;justifyContent: 'center'&lt;/strong&gt;: Vertically centers the content within the &lt;code&gt;View&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;alignItems: 'center'&lt;/strong&gt;: Horizontally centers the content within the &lt;code&gt;View&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;height: 300&lt;/strong&gt;: Sets the height of the &lt;code&gt;View&lt;/code&gt; to 300 units.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;width: 300&lt;/strong&gt;: Sets the width of the &lt;code&gt;View&lt;/code&gt; to 300 units.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;marginTop: 300&lt;/strong&gt;: Adds 300 units of space above the &lt;code&gt;View&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;marginLeft: 50&lt;/strong&gt;: Adds 50 units of space to the left of the &lt;code&gt;View&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Exporting the Component&lt;/strong&gt;
&lt;/h3&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Exports the &lt;code&gt;App&lt;/code&gt; component as the default export so it can be used as the main entry point of the application.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is what our final app looks like &lt;/p&gt;

&lt;h3&gt;
  
  
  Build you app
&lt;/h3&gt;

&lt;p&gt;Now our app is ready but we have finally build our first android app using React Native without expo ,Its time to get the fascinated apk file so that you can install and distribute your app easily .&lt;/p&gt;

&lt;p&gt;To achieve this simply run this command in your android folder &lt;/p&gt;

&lt;p&gt;First navigate to the android folder of your project&lt;/p&gt;

&lt;p&gt;Run this command :&lt;code&gt;./gradlew assembleRelease&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It will generate an apk file into your android folder.&lt;/p&gt;

&lt;p&gt;You can find the apk into the build folder of android folder inside outputs&amp;lt;apk&amp;lt;release as we have used relase command to build the apk .&lt;/p&gt;

&lt;p&gt;here is the snippet :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuf3s82ua1ls2n4gg84lo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuf3s82ua1ls2n4gg84lo.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Summary&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;App&lt;/code&gt; component uses a &lt;code&gt;ScrollView&lt;/code&gt; to ensure that if the content overflows the screen height, it can be scrolled.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Homepage&lt;/code&gt; component is placed within a &lt;code&gt;View&lt;/code&gt; that is centered on the screen with specific height, width, and margins.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;styles.container&lt;/code&gt; object defines how the &lt;code&gt;View&lt;/code&gt; should be styled, including its position and dimensions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This setup provides a simple and structured way to display the &lt;code&gt;Homepage&lt;/code&gt; component in a scrollable, centered manner.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Final Screens:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The final screens are out here as you can see when we click on fetch news buttons we get a news and its author and when we don't have any news to display its ask us to click on news button to fetch news.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2oy1rcrom53uocclmc3s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2oy1rcrom53uocclmc3s.png" alt="Image description"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxznw7aj90n4u0bs5fg51.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxznw7aj90n4u0bs5fg51.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Building anything is easy if know what tools to use and how to use them ,When I build my first react native app it took me 15 days to navigate to through various errors but I didn't give up and troubleshooted everything resulted in successful android build.&lt;br&gt;
This app is very simple but no matter how complex apps you are building the fundamentals are always be same.&lt;/p&gt;

&lt;p&gt;If you need source code ping me .&lt;br&gt;
Thanks for reading ...!&lt;br&gt;
Keep coding...&lt;/p&gt;



</description>
    </item>
    <item>
      <title>10 Game-Changing VS Code Extensions Every Dev is Using in 2024</title>
      <dc:creator>PRANKUR PANDEY</dc:creator>
      <pubDate>Fri, 30 Aug 2024 14:06:12 +0000</pubDate>
      <link>https://dev.to/prankurpandeyy/10-vs-code-extensions-to-make-you-super-productive-developer-1kkn</link>
      <guid>https://dev.to/prankurpandeyy/10-vs-code-extensions-to-make-you-super-productive-developer-1kkn</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;A Developer will have to spend a lot of time while developing products Product development is an entire lifecycle where you have to counter errors and solve them to proceed further.&lt;/p&gt;

&lt;p&gt;While solving errors, it become very hectic to keep a track of the development phase in which you have to keep multiple things active such as development environment,file structure,configurations,databases,deployment etc.&lt;/p&gt;

&lt;p&gt;To solve all these problems, there are multiple tools available in the market but you can’t predict which one is going to work for you or not ?&lt;/p&gt;

&lt;p&gt;Hers is my Tech Stack :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OS : Linux (Ubuntu)
&lt;/li&gt;
&lt;li&gt;Code Editor : VSCode
&lt;/li&gt;
&lt;li&gt;Terminal : WARP
&lt;/li&gt;
&lt;li&gt;Programming Languages : JavaScript,TypeScript
&lt;/li&gt;
&lt;li&gt;Front End : React JS,Next JS,React Native
&lt;/li&gt;
&lt;li&gt;Backend : NodeJS ,Express JS
&lt;/li&gt;
&lt;li&gt;Scripting : Python,Bash
&lt;/li&gt;
&lt;li&gt;Database :MongoDB,MYSQL
&lt;/li&gt;
&lt;li&gt;Cloud : AWS
&lt;/li&gt;
&lt;li&gt;Others : Appwrite
&lt;/li&gt;
&lt;li&gt;Code : Github/Git
&lt;/li&gt;
&lt;li&gt;Browser : Chrome
&lt;/li&gt;
&lt;li&gt;Testing :Jest,Selenium
&lt;/li&gt;
&lt;li&gt;Security Testing : Burp Suite
&lt;/li&gt;
&lt;li&gt;Data Analysis : numpy,pandas,matplotlib,D3JS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As you can notice, I deal with variety of tools to get my developer job done it becomes really hectic to manage various things on development .Here are my personal favorites VS Code Extensions, which I use on daily basis to boost up my productivity and save a lot of time .&lt;/p&gt;

&lt;h2&gt;
  
  
  Auto Close Tag
&lt;/h2&gt;

&lt;p&gt;Auto Close Tag is one of the most used extensions in my daily development process as it helps to auto close the tags. Let's understand by an example: suppose you have an html file and as per the standard standard, you have to define the &lt;code&gt;html&lt;/code&gt; tag at the top which starts with &lt;code&gt;&amp;lt;html&amp;gt;`&lt;/code&gt;as the open tag is declared at the top it must have to be closed at the bottom like this: &lt;code&gt;&amp;lt;/html&amp;gt;&lt;/code&gt; declaring every-time closing tags manually consumes time, especially in big files and sometimes it leads to errors if you forget to close the tag at the bottom.&lt;/p&gt;

&lt;p&gt;This extension takes care about closing tags intelligently so you don’t have to spend time .&lt;/p&gt;

&lt;h2&gt;
  
  
  Auto Import
&lt;/h2&gt;

&lt;p&gt;In big projects where multiple files, components, and pages are used, they would have to linked to each other, If the files are not linked well with each other, it throws an immediate error and breaks the whole app, Auto Import works very well and takes care of it very well .&lt;br&gt;&lt;br&gt;
You can make pages, components, and files and simply declare it on the places where its is required you will get an immediate prompt with the same page,components,files name just click on the prompt and you are good to go , you data is imported without manually configuring the files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Console Ninja
&lt;/h2&gt;

&lt;p&gt;Console Ninja my most favorite tool ,the tool allows you to directly see the &lt;code&gt;console.log&lt;/code&gt; outputs into the Code editor itself without looking into the browser. Simply install it and every time you declare a &lt;code&gt;console.log&lt;/code&gt; to display output of anything you are going to directly see the output in the VSCode itself without accessing the developers tools on the browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  ES7 React Redux Snippets
&lt;/h2&gt;

&lt;p&gt;This extension turbocharges your React development by providing shorthand snippets for common tasks. Instead of typing out boilerplate code for components, hooks, or Redux, you can generate it instantly with a few keystrokes, for examples Type &lt;code&gt;rfc&lt;/code&gt; to create a React functional component template in seconds, saving time and reducing errors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inttelicode
&lt;/h2&gt;

&lt;p&gt;Microsoft’s IntelliCode is an AI-powered tool that enhances your coding efficiency by providing intelligent code suggestions tailored to your unique coding style. It learns from your codebase and improves its recommendations over time, the example is When writing a function, IntelliCode suggests the most relevant methods or properties, helping you code faster and more accurately.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thunder Client
&lt;/h2&gt;

&lt;p&gt;Thunder Client is a lightweight REST API client integrated into VS Code, making it easy to test APIs directly within your development environment. It’s fast, intuitive, and ideal for quick API testing without leaving your editor. Use Thunder Client to send GET, POST, PUT, or DELETE requests to your API endpoints and inspect the responses, all without switching to a separate tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turbo Console Log
&lt;/h2&gt;

&lt;p&gt;Turbo Console Log automates the tedious process of adding console.log statements to your code, allowing you to quickly insert and manage logs with just a few commands. It’s a huge time-saver for debugging. Highlight a variable, and with a shortcut, Turbo Console Log will insert a &lt;code&gt;console.log&lt;/code&gt; statement for it, making debugging swift and efficient.&lt;/p&gt;

&lt;h2&gt;
  
  
  WakaTime
&lt;/h2&gt;

&lt;p&gt;WakaTime is a time-tracking extension that gives you insights into your coding habits. It automatically tracks the time you spend on different projects, helping you understand where your efforts are going. Review your weekly WakaTime dashboard to see which languages, projects, and files consumed most of your time, allowing you to optimize your workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prettier
&lt;/h2&gt;

&lt;p&gt;Prettier is an opinionated code formatter that ensures your code is consistently styled, no matter who wrote it. It automatically formats your code according to predefined rules, reducing stylistic debates and making your codebase cleaner. After writing a block of code, Prettier formats it on save, aligning indentations, fixing spacing, and making your code look polished.&lt;/p&gt;

&lt;h2&gt;
  
  
  Colorize
&lt;/h2&gt;

&lt;p&gt;Colorize enhances your CSS and JavaScript development by visualizing color values directly in your editor. It displays the actual color represented by a color code, making it easier to choose and adjust colors in your projects. example When working with &lt;code&gt;#ff5733&lt;/code&gt;, Colorize instantly shows the color swatch beside the code, so you can see exactly what color you’re working with.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Tools are the friend of developers using it enhances the prodcutivity and saves the time resulting in better output and gives a chance to solely focus on other critical work.&lt;/p&gt;

&lt;p&gt;If you have not started optimizing VSCode to the fullest you are leaving a good chance to save time and efforts .&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Build Your Own Productivity App in React JS Using Mock APIs: A Step-by-Step Guide for 2024</title>
      <dc:creator>PRANKUR PANDEY</dc:creator>
      <pubDate>Sun, 23 Jun 2024 08:10:44 +0000</pubDate>
      <link>https://dev.to/prankurpandeyy/building-your-own-productivity-app-using-react-js-and-mock-apis-1d5</link>
      <guid>https://dev.to/prankurpandeyy/building-your-own-productivity-app-using-react-js-and-mock-apis-1d5</guid>
      <description>&lt;h1&gt;
  
  
  Building your own Productivity app using React JS and Mock API's
&lt;/h1&gt;

&lt;p&gt;Productivity apps are the bless to humanity as it allows to effectively manage and create the tasks and notes and also according to the psychology writing down your thoughts the biggest anxiety killer.&lt;/p&gt;

&lt;p&gt;Have you ever thought of building your own Note taking app clone like google keep with some advance features, I know that's big to develop and maintain but as a side project you can definitely try it out to test your skills and feel what it is like to develop your small version of a note taking app with an addition to some more features on top of it.&lt;/p&gt;

&lt;p&gt;Today I will be guiding you to develop your version of the small note taking app with some new features keeping all the important features of google keep.&lt;/p&gt;

&lt;p&gt;I will be using the React JS, Tailwind CSS and Mock API's.&lt;/p&gt;

&lt;h1&gt;
  
  
  Folder Structure of the Project
&lt;/h1&gt;

&lt;p&gt;I will be using the standard folder structure to separate components and pages as it allows better management of files and data and improves the navigation inside the project.&lt;/p&gt;

&lt;p&gt;The Folder structure snippets are here you can see :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsceg3e52vax3ax0vkiym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsceg3e52vax3ax0vkiym.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Inside the main &lt;code&gt;src&lt;/code&gt; directory I have separated the files and folders for everything backend folder is handling the all mock backend stuff, components folder has components that I will be using in the project as React allows me to break down big pages into components and later I can also reuse the components.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Context&lt;/code&gt; folder has the useContext React API which is helping us in projects to manage the states the folder has useReducers code.&lt;/p&gt;

&lt;p&gt;The pages folder is all about pages where each page of our app is assembling the components.&lt;/p&gt;

&lt;p&gt;The services folder has the API calling methods there I am calling the APIs and storing the response.&lt;/p&gt;

&lt;p&gt;Utils contain important code and small libraries or something that is not very common.&lt;/p&gt;

&lt;p&gt;The rest of the files are related to projects in which the App.js file is important as it is the main file that holds the entire application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's Build
&lt;/h2&gt;

&lt;p&gt;Generally I have Figma Files for the inspirations and developers utilise the pre-existing desigs to turn them into code.&lt;/p&gt;

&lt;p&gt;Figma Files has all the designs about product development in form of pages therefore its suitable to first develop the pages to get an details overview of pages and how they are interlinking.&lt;/p&gt;

&lt;p&gt;This will also give you an overview of the application like how many pages you will need and which page will host and display what type of data.&lt;/p&gt;

&lt;p&gt;If you have a situation where you have to show multiple pages and the count of the pages will increase with time then it would be technically impossible to make so many pages but React has a special library where you can make as many pages as you want with respect to some unique URL, to do so I will use React Router which allows to make dynamic pages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0k9puic7m6kd0knd8e0e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0k9puic7m6kd0knd8e0e.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This application has :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Welcome page&lt;/li&gt;
&lt;li&gt;Home page&lt;/li&gt;
&lt;li&gt;Archives page&lt;/li&gt;
&lt;li&gt;Trash page&lt;/li&gt;
&lt;li&gt;Editnotes page&lt;/li&gt;
&lt;li&gt;Label page&lt;/li&gt;
&lt;li&gt;Login page&lt;/li&gt;
&lt;li&gt;Signup page&lt;/li&gt;
&lt;li&gt;Account page&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Welcomepage
&lt;/h2&gt;

&lt;p&gt;The Welcomepage is very simple and minimal it only reflects that what is our application is all about and how does it work how many features it has and how to use the application.&lt;/p&gt;

&lt;p&gt;The page contains Header, banner and footer components and I will be using the same header and footer across the app.&lt;/p&gt;

&lt;p&gt;The welcomepage looks like this&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh3n8ixn0xol7o7c4c5ll.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh3n8ixn0xol7o7c4c5ll.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also see the React code for building the welcomepage&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Hero&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Components/IndexAllComponents&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Welcomepage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Hero&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Welcomepage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;How clean the code is,isnt it ? That's why I follow standard coding practices and folder structure to improve the overall look of the code so that even a beginner can understand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Homepage
&lt;/h2&gt;

&lt;p&gt;The home page has the ,header,sidebar,footer and a filter section on top which automatically filters the notes based on their priority which are selected at the time of note creation.&lt;/p&gt;

&lt;p&gt;The Sidebar has multiple options and each option redirects to the page the pages are Homepage.Archive Page, Trash page and Accounts page .&lt;/p&gt;

&lt;p&gt;Homepage is the main page where notes are being displayed ,Archives page shows the notes which are archived , Trash Page has the all notes pushed to Trash and Accounts page has the details about the users and their data.&lt;/p&gt;

&lt;p&gt;The page looks like this after it gets loaded :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frjksl4dxrvqkxpbvdcdr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frjksl4dxrvqkxpbvdcdr.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also see the React code for building the Home page&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Utils/CustomUtils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useNoteTakingContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Context/IndexAllContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./Homepage.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Filters&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;NotesCard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;NotesModal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Sidebar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Components/IndexAllComponents&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getNotesDataFromAPIFn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Services/NoteTakingServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Homepage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;finalData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;priorityData&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useNoteTakingContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
   &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;getNotesDataFromAPIFn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;`&amp;lt;div&amp;gt;`&lt;/span&gt;
      &lt;span class="s2"&gt;`&amp;lt;Header /&amp;gt;`&lt;/span&gt;
      &lt;span class="s2"&gt;`&amp;lt;Sidebar /&amp;gt;`&lt;/span&gt;
      &lt;span class="s2"&gt;`&amp;lt;Filters /&amp;gt;`&lt;/span&gt;

    &lt;span class="s2"&gt;`&amp;lt;div&amp;gt;`&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;finalData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="s2"&gt;`&amp;lt;h1 className="header-text"&amp;gt;`&lt;/span&gt;
            &lt;span class="nx"&gt;No&lt;/span&gt; &lt;span class="nx"&gt;notes&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;Homepage&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt; &lt;span class="nx"&gt;some&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt;
            &lt;span class="s2"&gt;`&amp;lt;NotesModal /&amp;gt;`&lt;/span&gt;
          &lt;span class="s2"&gt;`&amp;lt;/h1&amp;gt;`&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="s2"&gt;`&amp;lt;div className="notes-container"&amp;gt;`&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;priorityData&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
              &lt;span class="nx"&gt;priorityData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;notes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;NotesCard&lt;/span&gt; &lt;span class="na"&gt;notesData&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;notes&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;notes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;))}&lt;/span&gt;
          &lt;span class="s2"&gt;`&amp;lt;/div&amp;gt;`&lt;/span&gt;
        &lt;span class="p"&gt;)}&lt;/span&gt;
      &lt;span class="s2"&gt;`&amp;lt;/div&amp;gt;`&lt;/span&gt;

    &lt;span class="s2"&gt;`&amp;lt;Footer /&amp;gt;`&lt;/span&gt;
    &lt;span class="s2"&gt;`&amp;lt;/div&amp;gt;`&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Homepage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component named Homepage. The component imports various utilities, context hooks, CSS styles, UI components, and a function to fetch data from an API. Within the Homepage function, the useNoteTakingContext hook is used to access data and functions related to note-taking.&lt;/p&gt;

&lt;p&gt;Upon mounting, the useEffect hook triggers a call to fetch notes data from an API using the provided function. The returned data is then used to update the context.&lt;/p&gt;

&lt;p&gt;The component's JSX structure includes several imported UI components such as Header, Sidebar, Filters, and Footer. The main content area conditionally displays a message prompting users to add notes if no notes are available. If notes are present, it maps over the priorityData array to render NotesCard components for each note.&lt;/p&gt;

&lt;p&gt;Finally, the Homepage component is exported as the default export, making it accessible for use in other parts of the application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Archives page
&lt;/h2&gt;

&lt;p&gt;Archive page is the place where I can see the archived notes , this page is used to hide the notes without permanently deleteing it ,if there is a note which I don't want anyone to see it I can move that note to archive.&lt;/p&gt;

&lt;p&gt;When I create a new note I get an option to move this perticular note to Archive page when the note is moved to archive page I also get the option to restore it as normal note and once the note is back to normal state I can see it on homepage.&lt;/p&gt;

&lt;p&gt;The page looks like this :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4p0h9fl27ydyi679jwq9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4p0h9fl27ydyi679jwq9.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the code snippet :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Utils/CustomUtils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useArchiveContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Context/IndexAllContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;ArchiveNotesCard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Sidebar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Components/IndexAllComponents&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getArchiveNotesFn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Services/ArchiveNotesServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Archivespage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getArchivedNotes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;notesArchiveFn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useArchiveContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;getArchiveNotesFn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;notesArchiveFn&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Sidebar&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;getArchivedNotes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"header-text"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            No notes to display in archive page, add some !
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"notes-container"&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;marginTop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;5rem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;getArchivedNotes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;archivenotesdata&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ArchiveNotesCard&lt;/span&gt;
                &lt;span class="na"&gt;archivenotesdata&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;archivenotesdata&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;archivenotesdata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
              &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Archivespage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component called Archivespage, which displays archived notes. Here's a detailed explanation of its structure and functionality:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Imports&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;React and useEffect are imported from a custom utilities file.&lt;/li&gt;
&lt;li&gt;The useArchiveContext hook is imported to access context data related to archived notes.&lt;/li&gt;
&lt;li&gt;CSS styles for the component are implicitly referenced through the JSX structure.&lt;/li&gt;
&lt;li&gt;Various UI components such as ArchiveNotesCard, Footer, Header, and Sidebar are imported from a central components file.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A function to fetch archived notes from an API is imported from a services file.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Function Declaration&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Archivespage component is defined as a functional component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Within this component, the useArchiveContext hook is used to extract getArchivedNotes (an array of archived notes) and notesArchiveFn (a function for handling notes archiving).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;useEffect Hook&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The useEffect hook is used to perform a side effect when the component mounts. It calls the getArchiveNotesFn function with notesArchiveFn as an argument to fetch archived notes from an API and update the context.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Rendering&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The component returns JSX markup to define its structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It includes several UI components such as Header, Sidebar, and Footer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the main content area, it conditionally renders a message if there are no archived notes available, prompting the user to add some.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If there are archived notes, it maps over the getArchivedNotes array and renders ArchiveNotesCard components for each archived note, passing the note data as a prop.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Export&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Archivespage component is exported as the default export, making it accessible for use in other parts of the application.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, the Archivespage component is responsible for fetching and displaying archived notes, incorporating various UI elements, and conditionally rendering content based on the availability of archived notes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trash Page
&lt;/h2&gt;

&lt;p&gt;Trash Page hold the notes which are moved to Trash basicaly I want to remove the notes from the system so I can use  Trash option which I get when I create a new note ,this Trash page also acts as recyle bin because I get an option to restore the notes to normal and also get the option permanently remove the notes from the system.&lt;/p&gt;

&lt;p&gt;The page looks like this :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fowysup96p6qcspi5j7zz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fowysup96p6qcspi5j7zz.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the code snippet :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Utils/CustomUtils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useTrashNotesContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Context/IndexAllContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Sidebar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;TrashNotesCard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Components/IndexAllComponents&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getTrashedNotesFn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Services/TrashNotesServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Trashpage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getTrashedNotes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;notesTrashFn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useTrashNotesContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;getTrashedNotesFn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;notesTrashFn&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Sidebar&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;getTrashedNotes&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;getTrashedNotes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"header-text"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            No notes to display in trash page, add some ..!
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"notes-container"&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;marginTop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;5rem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;getTrashedNotes&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
              &lt;span class="nx"&gt;getTrashedNotes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;trashnotesdata&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;TrashNotesCard&lt;/span&gt;
                  &lt;span class="na"&gt;trashnotesdata&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;trashnotesdata&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                  &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;trashnotesdata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Trashpage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component named Trashpage, which handles the display of trashed notes. Here's an explanation of its components and functionality:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Imports&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;The useEffect hook is imported from a custom utilities file.&lt;/li&gt;
&lt;li&gt;The useTrashNotesContext hook is imported to access context data and functions related to trashed notes.&lt;/li&gt;
&lt;li&gt;Various UI components such as Footer, Header, Sidebar, and TrashNotesCard are imported from a central components file.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A function to fetch trashed notes from an API is imported from a services file.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Function Declaration&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Trashpage component is defined as a functional component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Within this function, the useTrashNotesContext hook is used to extract getTrashedNotes (an array of trashed notes) and notesTrashFn (a function for handling trashed notes).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;useEffect Hook&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The useEffect hook is used to perform a side effect when the component mounts. It calls the getTrashedNotesFn function with notesTrashFn as an argument to fetch trashed notes from an API and update the context.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Rendering&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The component returns JSX markup to define its structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It includes several UI components such as Header, Sidebar, and Footer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The main content area conditionally renders a message if there are no trashed notes available, prompting the user to add some.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If there are trashed notes, it maps over the getTrashedNotes array and renders TrashNotesCard components for each trashed note, passing the note data as a prop.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Export&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Trashpage component is exported as the default export, making it accessible for use in other parts of the application.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, the Trashpage component is responsible for fetching and displaying trashed notes, incorporating various UI elements, and conditionally rendering content based on the availability of trashed notes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Editnotes page
&lt;/h2&gt;

&lt;p&gt;We human commit mistakes as the mistakes could happen anywhere and anytime so having an option to corrent it is like a blessings therfore in this note taking app I can also make mistaked while composing notes but I have an option to edit the notes and correct the mistakes and again republish the notes.&lt;/p&gt;

&lt;p&gt;An edit option is a feature which allows to fix the problems and this perticular feature is tough to develop as its the backbone of note taking system.&lt;/p&gt;

&lt;p&gt;Look into this picture :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70ayyai1ghnt4vzq00s2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70ayyai1ghnt4vzq00s2.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see this is the first note which we have made it has title,a paragraph for details,labels,priority,when the note was created,edit icon to edit note,trash icon to move notes to trash , archive note icon and when the note was created on what date and time , the option when the note was updated(edited) is empty.&lt;/p&gt;

&lt;p&gt;Look into this image :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmdc0fjnbknr2ac9etnaj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmdc0fjnbknr2ac9etnaj.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this picture you can clearly see an updated note from the previous image the title,paragraph,label is updated and the note updation date and time is clearly mentioned on note itself,I can also change the background color of note while editing the note.&lt;/p&gt;

&lt;p&gt;here is how note compose and edit form looks  at the page  :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft2zv7lecqe0i1keq8og2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft2zv7lecqe0i1keq8og2.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;here is the code :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;EditForm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Sidebar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Components/IndexAllComponents&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Editnotespage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Sidebar&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;EditForm&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Editnotespage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component named Editnotespage. Here's an explanation of its components and functionality:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Imports&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The EditForm, Footer, Header, and Sidebar components are imported from a central components file.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Function Declaration&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The Editnotespage component is defined as a functional component.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Rendering&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The component returns JSX markup to define its structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It includes several UI components: Header, Sidebar, EditForm, and Footer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Header&lt;/strong&gt;: Typically displays the top navigation or title.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sidebar&lt;/strong&gt;: Usually contains navigation links or additional options.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EditForm&lt;/strong&gt;: A form component for editing notes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Footer&lt;/strong&gt;: Typically displays the bottom navigation or additional information.

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Export&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;The Editnotespage component is exported as the default export, making it accessible for use in other parts of the application.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Overall, the Editnotespage component serves as a page layout that includes a header, sidebar, an editing form for notes, and a footer. It is responsible for providing a structured interface for editing notes within the application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Label page
&lt;/h2&gt;

&lt;p&gt;When I create a new page I get an option to add label to that specific note , when I will have too much notes It will be difficult to handle and find each note so I added this feature to filter out notes from the sidebar menu once the note is created with specific label that label will be automatically added to sidebar I can easily find the note by clicking on that perticular label.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp9kqhllrt920xd0og4gu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp9kqhllrt920xd0og4gu.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have added to notes with the same label name &lt;code&gt;demo&lt;/code&gt; and both of the notes are visible on demo page ,the acess to demo page was given through the sidebar where &lt;code&gt;demo&lt;/code&gt; label is added when the note was created and &lt;code&gt;demo&lt;/code&gt; as label was gievn there.&lt;/p&gt;

&lt;p&gt;here is the code snippet :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

 &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useParams&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-router-dom&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Sidebar&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Components/IndexAllComponents&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;LabelNotesCard&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Components/NotesCard/LabelNotesCard&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useNoteTakingContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Context/NotetakingContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getNotesDataFromAPIFn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Services/NoteTakingServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Labelpage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getNotesData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;priorityData&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useNoteTakingContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;params&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useParams&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;labeledData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;priorityData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;labelInputBoxValue&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nf"&gt;getNotesDataFromAPIFn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Sidebar&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"notes-container"&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;marginTop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;5rem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;labeledData&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
&lt;span class="nx"&gt;labeledData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;labeledNotesData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;LabelNotesCard&lt;/span&gt;
           &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;labeledNotesData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
           &lt;span class="na"&gt;labeledNotesData&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;labeledNotesData&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
         &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Labelpage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component named Labelpage, which is responsible for displaying notes filtered by a specific label. Here's an explanation of its components and functionality:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Imports&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;React and useEffect are imported from the React library.&lt;/li&gt;
&lt;li&gt;The useParams hook is imported from react-router-dom to access route parameters.&lt;/li&gt;
&lt;li&gt;Several UI components (Footer, Header, Sidebar) are imported from a central components file.&lt;/li&gt;
&lt;li&gt;The LabelNotesCard component is imported from a subdirectory.&lt;/li&gt;
&lt;li&gt;The useNoteTakingContext hook is imported to access note-taking context data.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A function to fetch notes data from an API is imported from a services file.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Function Declaration&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Labelpage component is defined as a functional component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inside this component, the useNoteTakingContext hook is used to extract notesTakingFn, getNotesData, and priorityData from the context.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The useParams hook is used to get the label parameter from the URL.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Filtering Data&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The labeledData variable is created by filtering the priorityData array to include only notes with a label that matches the label parameter from the URL.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;useEffect Hook&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The useEffect hook is used to fetch notes data from an API when the component mounts. It calls the getNotesDataFromAPIFn function with notesTakingFn as an argument to update the context.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Rendering&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The component returns JSX markup to define its structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It includes the Header, Sidebar, and Footer components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It renders a container for notes with a margin at the top.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inside the container, it maps over the labeledData array and renders a LabelNotesCard component for each filtered note, passing the note data as a prop.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Export&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Labelpage component is exported as the default export, making it accessible for use in other parts of the application.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, the Labelpage component is responsible for fetching notes data, filtering the notes based on the label from the URL parameter, and displaying the filtered notes using the LabelNotesCard component along with other UI elements like the header, sidebar, and footer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Account manager page
&lt;/h2&gt;

&lt;p&gt;The account manager page shows the data related to your account where I am showing how many notes I have  created, what's my name and email and phone number.&lt;/p&gt;

&lt;p&gt;Here is what the page looks like :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4j2ivrkvaf808xqrfd8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4j2ivrkvaf808xqrfd8.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;in this image I have a special unique used Id , my name and email along with the how many notes how I have created here I have made 3 notes therefore 3 notes are showing.&lt;/p&gt;

&lt;p&gt;Here is the code snippet :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Account&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Sidebar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Components/IndexAllComponents&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Accountpage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Sidebar&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Account&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Accountpage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;




&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component named Accountpage. Here's an explanation of its structure and functionality:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Imports&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Several UI components (Account, Footer, Header, Sidebar) are imported from a central components file. These components are likely used to build the page layout.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Function Declaration&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The Accountpage component is defined as a functional component.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Rendering&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The component returns JSX markup to define its structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It includes several UI components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Header&lt;/strong&gt;: Likely displays the top navigation or page title.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sidebar&lt;/strong&gt;: Usually contains navigation links or additional options.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Account&lt;/strong&gt;: Presumably displays account-related information or settings for the user.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Footer&lt;/strong&gt;: Typically displays the bottom navigation or additional information.

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Export&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;The Accountpage component is exported as the default export, making it accessible for use in other parts of the application.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Overall, the Accountpage component serves as a page layout that includes a header, sidebar, account information section, and footer. It provides a structured interface for displaying account-related information or settings within the application.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Note-taking functionality :
&lt;/h2&gt;

&lt;p&gt;As the app is all about taking notes and managing them its is important to dicuss about the notes taking feature , it's the backbone of application and how I have managed to build this notes app using React JS and MockAPIs.&lt;/p&gt;

&lt;p&gt;The note taking functions takes notes header, priority ,label ,paragraph and notes color and produces the final notes based on the given input values.&lt;/p&gt;

&lt;p&gt;Here is the snapshot of note taking feature:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft2zv7lecqe0i1keq8og2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft2zv7lecqe0i1keq8og2.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;here is  the code snippet:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useNoteTakingContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/IndexAllContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;addNotesintoDbFn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Services/NoteTakingServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;RTEEditor&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Editor/RTEEditor&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./InputNotes.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;InputNotes&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;toggleModal&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;notesBgColor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;inputTextTitleValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;priorityRadioBoxValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;labelInputBoxValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;textareaBoxValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;noteCreationTime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;isOpen&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useNoteTakingContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;submitNotes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;addNotesintoDbFn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;inputTextTitleValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;priorityRadioBoxValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;labelInputBoxValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;textareaBoxValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;notesBgColor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;noteCreationTime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;notesTakingFn&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nf"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;INPUTTEXTTITLEVALUE&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="nf"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;PRIORITYRADIOBOXVALUE&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="nf"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;LABELINPUTBOXVALUE&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="nf"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;TEXTAREABOXVALUE&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="nf"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;NOTESBGCOLOR&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="nf"&gt;toggleModal&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;
        &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"notes1-container"&lt;/span&gt;
        &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;notesBgColor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;defaultValue&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"#FFFF"&lt;/span&gt;
      &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"form-container"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;form&lt;/span&gt; &lt;span class="na"&gt;onSubmit&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;submitNotes&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt;
              &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt;
              &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;
              &lt;span class="na"&gt;required&lt;/span&gt;
              &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"navigation__input"&lt;/span&gt;
              &lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"notes Title....!"&lt;/span&gt;
              &lt;span class="na"&gt;onChange&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
                &lt;span class="nf"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;INPUTTEXTTITLEVALUE&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                  &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="p"&gt;})&lt;/span&gt;
              &lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;label&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"label-radio-box"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              Priority
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt;
                &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"radio"&lt;/span&gt;
                &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"priority"&lt;/span&gt;
                &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"top"&lt;/span&gt;
                &lt;span class="na"&gt;required&lt;/span&gt;
                &lt;span class="na"&gt;checked&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;priorityRadioBoxValue&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;top&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                &lt;span class="na"&gt;onChange&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
                  &lt;span class="nf"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;PRIORITYRADIOBOXVALUE&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                  &lt;span class="p"&gt;})&lt;/span&gt;
                &lt;span class="si"&gt;}&lt;/span&gt;
              &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
              Top
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt;
                &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"radio"&lt;/span&gt;
                &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"priority"&lt;/span&gt;
                &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"medium"&lt;/span&gt;
                &lt;span class="na"&gt;required&lt;/span&gt;
                &lt;span class="na"&gt;checked&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;priorityRadioBoxValue&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;medium&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                &lt;span class="na"&gt;onChange&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
                  &lt;span class="nf"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;PRIORITYRADIOBOXVALUE&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                  &lt;span class="p"&gt;})&lt;/span&gt;
                &lt;span class="si"&gt;}&lt;/span&gt;
              &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
              Medium
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt;
                &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"radio"&lt;/span&gt;
                &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"priority"&lt;/span&gt;
                &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"low"&lt;/span&gt;
                &lt;span class="na"&gt;required&lt;/span&gt;
                &lt;span class="na"&gt;checked&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;priorityRadioBoxValue&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;low&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                &lt;span class="na"&gt;onChange&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
                  &lt;span class="nf"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;PRIORITYRADIOBOXVALUE&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                  &lt;span class="p"&gt;})&lt;/span&gt;
                &lt;span class="si"&gt;}&lt;/span&gt;
              &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
              Low&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;label&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt;
              &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt;
              &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;
              &lt;span class="na"&gt;required&lt;/span&gt;
              &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"navigation__input"&lt;/span&gt;
              &lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"add labels....!"&lt;/span&gt;
              &lt;span class="na"&gt;onChange&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
                &lt;span class="nf"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;LABELINPUTBOXVALUE&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                  &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="p"&gt;})&lt;/span&gt;
              &lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"rte-icons"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;RTEEditor&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"color-pallete"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"take-notes-btn"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;label&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt;
                  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"color"&lt;/span&gt;
                  &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"input-color"&lt;/span&gt;
                  &lt;span class="na"&gt;onChange&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
                    &lt;span class="nf"&gt;notesTakingFn&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;NOTESBGCOLOR&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="p"&gt;})&lt;/span&gt;
                  &lt;span class="si"&gt;}&lt;/span&gt;
                &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons rte-icons2"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;color_lens &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;label&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;form&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;InputNotes&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;




&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component named InputNotes, which provides a form for creating and submitting notes. Here’s a detailed explanation of its components and functionality:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Imports&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;useNoteTakingContext&lt;/code&gt; hook is imported to access the context for note-taking.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;addNotesintoDbFn&lt;/code&gt; function is imported to handle the logic of adding a note to the database.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;RTEEditor&lt;/code&gt; component is imported to provide a rich text editor for note content.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CSS styles specific to this component are imported from "InputNotes.css".&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Function Declaration&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;code&gt;InputNotes&lt;/code&gt; component is defined as a functional component that receives a &lt;code&gt;toggleModal&lt;/code&gt; function as a prop.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inside this component, various state values and functions are extracted from the note-taking context, such as &lt;code&gt;notesBgColor&lt;/code&gt;, &lt;code&gt;inputTextTitleValue&lt;/code&gt;, &lt;code&gt;priorityRadioBoxValue&lt;/code&gt;, &lt;code&gt;labelInputBoxValue&lt;/code&gt;, &lt;code&gt;textareaBoxValue&lt;/code&gt;, &lt;code&gt;noteCreationTime&lt;/code&gt;, &lt;code&gt;notesTakingFn&lt;/code&gt;, and &lt;code&gt;isOpen&lt;/code&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Form Submission&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;code&gt;submitNotes&lt;/code&gt; function is defined to handle form submission. It takes an event (&lt;code&gt;e&lt;/code&gt;) as an argument.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This function calls &lt;code&gt;addNotesintoDbFn&lt;/code&gt; with various note attributes and the &lt;code&gt;notesTakingFn&lt;/code&gt; to add the note to the database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After adding the note, it resets the form fields by dispatching actions to the &lt;code&gt;notesTakingFn&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Finally, it calls &lt;code&gt;toggleModal&lt;/code&gt; to close the modal containing the form.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Rendering&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The component returns JSX markup to define its structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The main container has a background color set to &lt;code&gt;notesBgColor&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The form includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An input field for the note title, with an &lt;code&gt;onChange&lt;/code&gt; handler to update the &lt;code&gt;inputTextTitleValue&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A set of radio buttons for selecting the note's priority, each with an &lt;code&gt;onChange&lt;/code&gt; handler to update the &lt;code&gt;priorityRadioBoxValue&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;An input field for adding labels, with an &lt;code&gt;onChange&lt;/code&gt; handler to update the &lt;code&gt;labelInputBoxValue&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;RTEEditor&lt;/code&gt; component for rich text editing.&lt;/li&gt;
&lt;li&gt;A color picker for selecting the background color of the note, with an &lt;code&gt;onChange&lt;/code&gt; handler to update the &lt;code&gt;notesBgColor&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A submit button to submit the form.

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Export&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;The &lt;code&gt;InputNotes&lt;/code&gt; component is exported as the default export, making it accessible for use in other parts of the application.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Overall, the &lt;code&gt;InputNotes&lt;/code&gt; component provides a user interface for creating and submitting new notes, including setting the note title, priority, labels, content, and background color. The form submission logic handles adding the note to a database and resetting the form fields.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion :
&lt;/h2&gt;

&lt;p&gt;Finally I thoroughly enjoyed building this small note taking app clone as it has given me a deeper understanding of React development and various other tools of the React ecosystem, here is the breakdown of the technologies I have learned :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ReactJS&lt;/li&gt;
&lt;li&gt;React Router v6&lt;/li&gt;
&lt;li&gt;React Context API and useReducer&lt;/li&gt;
&lt;li&gt;React Player&lt;/li&gt;
&lt;li&gt;
&lt;a href="[https://slateui.netlify.app/](https://slateui.netlify.app/)"&gt;Slate UI&lt;/a&gt; - CSS Component Library&lt;/li&gt;
&lt;li&gt;MockBee&lt;/li&gt;
&lt;li&gt;React Hot Toast&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;here is the feature list of the application :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add Notes&lt;/li&gt;
&lt;li&gt;Edit Notes&lt;/li&gt;
&lt;li&gt;Archive Notes&lt;/li&gt;
&lt;li&gt;Delete Notes&lt;/li&gt;
&lt;li&gt;Search Notes&lt;/li&gt;
&lt;li&gt;Add/update Note labels&lt;/li&gt;
&lt;li&gt;Add/update Note priority&lt;/li&gt;
&lt;li&gt;Add/update Note color&lt;/li&gt;
&lt;li&gt;Filter and sort Notes&lt;/li&gt;
&lt;li&gt;Rich Text Editor&lt;/li&gt;
&lt;li&gt;Toasts&lt;/li&gt;
&lt;li&gt;Authentication&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for Reading it you can see the complete code on &lt;a href="https://github.com/VayuSoftwares/Slate-Note-Taking/tree/development/slate-note-taking" rel="noopener noreferrer"&gt;github&lt;/a&gt; and can browse the project &lt;a href="https://slate-note-taking.netlify.app/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have anything to share with me or want me to develop some web app I am always open to opportunities you can connect here on &lt;a href="[https://www.linkedin.com/in/prankurpandeyy/](https://www.linkedin.com/in/prankurpandeyy/)"&gt;Linkedin&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Leveraging Salesforce MuleSoft for Seamless Data Integration</title>
      <dc:creator>PRANKUR PANDEY</dc:creator>
      <pubDate>Sun, 23 Jun 2024 08:02:30 +0000</pubDate>
      <link>https://dev.to/prankurpandeyy/leveraging-salesforce-mulesoft-for-seamless-data-integration-2dlc</link>
      <guid>https://dev.to/prankurpandeyy/leveraging-salesforce-mulesoft-for-seamless-data-integration-2dlc</guid>
      <description>&lt;p&gt;Organizations today are overloaded with data from various sources, often residing in disparate systems, creating silos that hinder effective use. This fragmentation leads to inefficiencies, fragmented insights, and missed opportunities.&lt;/p&gt;

&lt;p&gt;Picture a sales team unable to access crucial customer information or an operations team facing delays due to unsynced ERP data. These scenarios highlight the critical need for seamless data integration to ensure smooth operations and informed decision-making.&lt;/p&gt;

&lt;p&gt;Salesforce MuleSoft addresses these challenges by breaking down data silos and enabling seamless integration across your business ecosystem. MuleSoft’s API-led approach simplifies integration, enhances data flow, and ensures real-time access to information. In this article, you'll discover how MuleSoft can transform your data integration strategy and drive operational efficiency.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features of MuleSoft for Data Integration
&lt;/h2&gt;

&lt;p&gt;MuleSoft offers a wide range of key features that make it a powerful tool for data integration. These features include API-led connectivity, the Anypoint Platform, pre-built connectors, and data transformation and mapping capabilities.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;API-led Connectivity is one of MuleSoft's key features, which simplifies integration by allowing organizations to connect applications, data, and devices through APIs. This approach ensures that data is exposed consistently and reusable, making building new applications and services easier.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Anypoint Platform is another critical feature of MuleSoft. It provides a unified platform for managing, designing, and publishing APIs. With the Anypoint Platform, organizations can create, publish, and update APIs and manage their lifecycle. This platform allows for seamless collaboration and enables organizations to speed up the delivery of new applications and services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MuleSoft also offers various pre-built connectors for different systems, such as Salesforce, SAP, and Oracle. These connectors provide out-of-the-box integration capabilities, allowing organizations to quickly and easily connect to various systems without needing custom development. Pre-built connectors accelerate integration, ensuring organizations can leverage their existing systems and data sources.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data transformation and mapping capabilities are essential for data integration, and MuleSoft provides robust tools for performing these tasks. The Anypoint Platform includes a graphical data mapper, allowing users to visually transform and map data between different systems. This eliminates the need for manual coding and simplifies the data integration process. Additionally, MuleSoft supports various data formats and protocols, making it easy to handle diverse data sources.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Benefits of Using MuleSoft for Data Integration
&lt;/h2&gt;

&lt;p&gt;Using MuleSoft for data integration offers many benefits, including improved data flow and accessibility, enhanced customer insights, and increased operational efficiency.&lt;/p&gt;

&lt;p&gt;One key benefit of using MuleSoft for data integration is improved data flow and accessibility. MuleSoft provides a unified platform that enables businesses to connect and integrate data from different sources, such as databases, cloud applications, and APIs. This allows for a smooth and efficient data flow between systems, eliminating manual data entry and ensuring that data is consistently up-to-date and accurate.&lt;/p&gt;

&lt;p&gt;In addition, using MuleSoft for data integration can increase operational efficiency. By automating data integration processes, businesses can save time and resources that would otherwise be spent on manual data entry and maintenance. This improves productivity and allows employees to focus on more strategic and value-added tasks.&lt;/p&gt;

&lt;p&gt;Furthermore, MuleSoft offers a range of tools and features that enhance data security and governance. It provides robust security measures, such as encryption and user authentication, to protect data from unauthorized access or breaches. MuleSoft also offers data governance capabilities, such as &lt;a href="https://hutte.io/trails/salesforce-data-quality-and-cleansing/" rel="noopener noreferrer"&gt;data quality&lt;/a&gt; checks and auditing, to ensure that data is reliable and compliant with regulatory requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up MuleSoft for Salesforce Integration
&lt;/h2&gt;

&lt;p&gt;Setting up MuleSoft for Salesforce integration requires a few important steps to ensure a smooth and successful integration between the two systems. This section will guide you through the initial setup process and provide the necessary information to get started.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Preparing Salesforce:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Before setting up MuleSoft, ensuring your Salesforce instance is configured correctly is essential. This includes creating the necessary Salesforce user accounts, defining security settings, and granting access permissions. Additionally, ensure you have identified the specific Salesforce objects and fields you want to integrate with other systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-us.googleusercontent.com%2Fdocsz%2FAD_4nXf78EDnCAMChUvtYeNJDhPtGj4ahhr1k7VIAjOAhTajG8WzGgRKHwftjcXRWbTIT5NmXJcCyLbzNZsDiraVnTkW8xkscK8ytZL4-rxzvfUNqbyJ6nI6ZvYIrl4HSVVtzHgV5El-vRr_sIcZ3-qmbjDla2_W%3Fkey%3DnKbHgwZEKDJJ4FoVQJr9rA" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-us.googleusercontent.com%2Fdocsz%2FAD_4nXf78EDnCAMChUvtYeNJDhPtGj4ahhr1k7VIAjOAhTajG8WzGgRKHwftjcXRWbTIT5NmXJcCyLbzNZsDiraVnTkW8xkscK8ytZL4-rxzvfUNqbyJ6nI6ZvYIrl4HSVVtzHgV5El-vRr_sIcZ3-qmbjDla2_W%3Fkey%3DnKbHgwZEKDJJ4FoVQJr9rA" title="Salesforce" alt="Image Source: Salesforce"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Image Source: &lt;a href="https://help.salesforce.com/s/articleView?id=sf.security_overview.htm&amp;amp;type=5" rel="noopener noreferrer"&gt;Salesforce&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Installing MuleSoft:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To set up MuleSoft, you must first install the MuleSoft Anypoint Studio, a powerful integrated development environment (IDE) designed for building and deploying Mule applications. The Anypoint Studio can be easily downloaded from the &lt;a href="https://www.mulesoft.com/lp/dl/anypoint-mule-studio?_gl=1*1j9y7c7*_ga*MTI2NjI3MDUwNi4xNzE4NzkyNDA4*_ga_HQLG2N93Q1*MTcxODc5MjQwNi4xLjEuMTcxODc5MzQ0NC4wLjAuMA.." rel="noopener noreferrer"&gt;MuleSoft website&lt;/a&gt;, and the installation process is straightforward. Once installed, you can proceed to the next step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-us.googleusercontent.com%2Fdocsz%2FAD_4nXeng6Csn1FF9Xm1qSDks-BolZs_QhGEP6Gb18JqWXf5yOwHQtFce5F5TxHOwB5jvAwJUuBpdKXoxI9jqPfKiA4sN7-Ibb6_smyyr9SbMNCZnhqX3wJej-mJnSGqrtqPkAr1YamqDG2k50OHP4u9gEeXpHA%3Fkey%3DnKbHgwZEKDJJ4FoVQJr9rA" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-us.googleusercontent.com%2Fdocsz%2FAD_4nXeng6Csn1FF9Xm1qSDks-BolZs_QhGEP6Gb18JqWXf5yOwHQtFce5F5TxHOwB5jvAwJUuBpdKXoxI9jqPfKiA4sN7-Ibb6_smyyr9SbMNCZnhqX3wJej-mJnSGqrtqPkAr1YamqDG2k50OHP4u9gEeXpHA%3Fkey%3DnKbHgwZEKDJJ4FoVQJr9rA" title="Mulesoft" alt="Image Source: Mulesoft&amp;lt;br&amp;gt;
"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Image Source: &lt;a href="https://www.mulesoft.com/platform/studio" rel="noopener noreferrer"&gt;Mulesoft&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Configuring MuleSoft:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After installing Anypoint Studio, you will need to configure MuleSoft to establish the connection with your Salesforce instance. This involves creating a new Mule project and configuring the required connectors and configurations. The Anypoint Studio provides a user-friendly interface that allows you to easily configure Salesforce connectivity. Simply follow the step-by-step instructions provided by MuleSoft's documentation to set up the necessary connections.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-us.googleusercontent.com%2Fdocsz%2FAD_4nXd4vAH0qazPg6Ri6IX96GR7GRfkCB8zA2y9RnwQZI3pn8SqFp3KkSPvTGkQVRWF66o9DwhO-_rptzCacOI3UTrcI0LpXTAlDQxp3Oy8Egbmd_q8FqfqX09qnovAdi9r34CEr4kfaxtFi3kKXLEafCCnpD-S%3Fkey%3DnKbHgwZEKDJJ4FoVQJr9rA" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-us.googleusercontent.com%2Fdocsz%2FAD_4nXd4vAH0qazPg6Ri6IX96GR7GRfkCB8zA2y9RnwQZI3pn8SqFp3KkSPvTGkQVRWF66o9DwhO-_rptzCacOI3UTrcI0LpXTAlDQxp3Oy8Egbmd_q8FqfqX09qnovAdi9r34CEr4kfaxtFi3kKXLEafCCnpD-S%3Fkey%3DnKbHgwZEKDJJ4FoVQJr9rA" title="Mulesoft" alt="Image Source: Mulesoft&amp;lt;br&amp;gt;
"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Image Source: &lt;a href="https://docs.mulesoft.com/studio/6.x/setting-up-your-development-environment" rel="noopener noreferrer"&gt;Mulesoft&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Authenticating Salesforce:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Authentication is a crucial step in setting up MuleSoft for Salesforce integration. To establish a secure and reliable connection, you must authenticate the MuleSoft application with Salesforce. MuleSoft provides various authentication mechanisms, such as OAuth, to authenticate with Salesforce. Choose the authentication method that best suits your requirements and follow the authentication process outlined in MuleSoft's documentation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-us.googleusercontent.com%2Fdocsz%2FAD_4nXe06OFMFWzn7njRjEcA8wi0JPqFI-YDaEwWg16_9HOJneoCvp6J9meTG-mto5HkwGGXYlDtQzJR5jCfdpaBHvp_pZguo9X7iowwUazQYzqN2UMUa-TrjuzIkwOCQfcNzcrJTxrMsgrHnCI37ZDzNGM4Ey8%3Fkey%3DnKbHgwZEKDJJ4FoVQJr9rA" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-us.googleusercontent.com%2Fdocsz%2FAD_4nXe06OFMFWzn7njRjEcA8wi0JPqFI-YDaEwWg16_9HOJneoCvp6J9meTG-mto5HkwGGXYlDtQzJR5jCfdpaBHvp_pZguo9X7iowwUazQYzqN2UMUa-TrjuzIkwOCQfcNzcrJTxrMsgrHnCI37ZDzNGM4Ey8%3Fkey%3DnKbHgwZEKDJJ4FoVQJr9rA" title="Mulesoft" alt="Image Source: Mulesoft&amp;lt;br&amp;gt;
"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Image Source: &lt;a href="https://docs.mulesoft.com/api-manager/latest/mule-oauth-provider-landing-page#:~:text=In%20the%20Mule%20OAuth%202.0,policy%20validates%20the%20token%20successfully." rel="noopener noreferrer"&gt;Mulesoft&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Testing the Connection:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once the configuration and authentication steps are completed, it is important to test the connection between MuleSoft and Salesforce. This can be done by running a sample integration flow or performing a simple data retrieval or update operation. Testing the connection ensures that the integration works as expected and helps identify potential issues or errors.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-us.googleusercontent.com%2Fdocsz%2FAD_4nXfavbc-JHeUP0XhYmvCM2Of0vap0ojYIHy9Pp6EIlzdqpEzoUJdvnYRDj7nnZaBGqm0G43_vpnn2cxgZhGrCojoHtElotzDMHHh9Y9X1bofbby2vpFtFMZwvNbPaQ6YClPEuuJNW6HctZ0XU6ImUVbgm-lG%3Fkey%3DnKbHgwZEKDJJ4FoVQJr9rA" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-us.googleusercontent.com%2Fdocsz%2FAD_4nXfavbc-JHeUP0XhYmvCM2Of0vap0ojYIHy9Pp6EIlzdqpEzoUJdvnYRDj7nnZaBGqm0G43_vpnn2cxgZhGrCojoHtElotzDMHHh9Y9X1bofbby2vpFtFMZwvNbPaQ6YClPEuuJNW6HctZ0XU6ImUVbgm-lG%3Fkey%3DnKbHgwZEKDJJ4FoVQJr9rA" title="Mulesoft" alt="Image Source: Mulesoft&amp;lt;br&amp;gt;
"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Image Source: &lt;a href="https://docs.mulesoft.com/salesforce-connector/latest/" rel="noopener noreferrer"&gt;Mulesoft&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Securing the Integration:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Security is a critical aspect of any integration project. Proper security measures should be implemented to ensure the security of your MuleSoft and Salesforce integration. This includes setting up secure communication protocols, enforcing access controls, encrypting sensitive data, and regularly monitoring and auditing the integration for possible vulnerabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices for Effective Data Integration
&lt;/h2&gt;

&lt;p&gt;Effective data integration is crucial for businesses that want to leverage the power of data to drive decision-making and operational efficiency. Although integrating different data sources can seem daunting, certain best practices can ensure a successful integration project.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Planning and Strategy: Importance of a clear integration strategy&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A key step in achieving effective data integration is a clear integration strategy. This strategy should outline the goals and objectives of the integration project and the steps required to achieve them. Without a clear strategy, organizations may struggle to make sense of the data and fail to achieve the desired outcomes.&lt;/p&gt;

&lt;p&gt;A well-defined strategy ensures that all stakeholders are aligned and working towards common goals. It also helps set expectations and identifies potential risks and challenges that may arise during the integration process.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Data Governance: Ensuring data quality and compliance&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Data governance plays a crucial role in effective data integration. It involves defining and implementing policies and procedures for managing data, ensuring data quality, and maintaining compliance with regulatory requirements. Organizations risk integrating incomplete or inaccurate data without proper data governance, resulting in flawed insights and erroneous decision-making.&lt;/p&gt;

&lt;p&gt;Organizations should establish data standards, validation processes, and quality controls to ensure data quality. This includes data cleansing, profiling, and establishing data ownership and accountability. Additionally, organizations must comply with data privacy and security regulations, such as GDPR or CCPA, to protect sensitive customer information during integration.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Performance Monitoring: Tools and techniques for monitoring integration performance&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Monitoring integration performance is vital to ensuring the smooth functioning of integrated systems. It helps identify bottlenecks, performance issues, and potential failures, allowing organizations to take proactive measures and optimize the integration process. Having the right tools and techniques for performance monitoring can significantly enhance the efficiency and effectiveness of data integration.&lt;/p&gt;

&lt;p&gt;Integration monitoring tools provide real-time visibility into the integration flows and enable organizations to track data throughput, latency, and error rates. These tools also allow for proactive monitoring, alerting, and troubleshooting of issues. Performance, load, and stress testing should also be conducted to ensure the integrated systems can handle the expected data volumes and workloads without compromising performance.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Security Considerations: Protecting sensitive data during integration&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Security should be a top priority when it comes to data integration. Organizations must protect sensitive data during integration to prevent breaches and uphold customer trust. This involves implementing data encryption, access controls, and secure data transfer protocols.&lt;/p&gt;

&lt;p&gt;Organizations should also conduct thorough security assessments to identify and mitigate any vulnerabilities in the integration infrastructure. Regular security audits and updates are essential to protect the integrated systems against evolving security threats. Additionally, data masking or anonymization techniques can be employed to minimize the exposure of sensitive data during integration testing or development activities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges and Solutions
&lt;/h2&gt;

&lt;p&gt;Integrating MuleSoft and Salesforce can present a range of challenges. One of the most common obstacles is the complexity of integrated systems. MuleSoft and Salesforce are highly robust platforms, and bringing them together requires meticulous planning and careful execution. Additionally, the data models used by MuleSoft and Salesforce can differ significantly, creating difficulties in mapping and transforming data between the two systems.&lt;/p&gt;

&lt;p&gt;Furthermore, security and access control can be challenging, as ensuring that data is securely transmitted and accessed by the right users is vital in maintaining the integrity and confidentiality of sensitive information.&lt;/p&gt;

&lt;h3&gt;
  
  
  Overcoming Obstacles
&lt;/h3&gt;

&lt;p&gt;To overcome these challenges, organizations should adopt a structured approach to integration. This includes thoroughly analyzing the integrated systems, identifying potential roadblocks, and developing a comprehensive integration strategy. It is crucial to involve relevant stakeholders from the MuleSoft and Salesforce teams to ensure all requirements are considered and addressed.&lt;/p&gt;

&lt;p&gt;Understanding the data models used in both platforms is essential for successful integration. Time should be invested in mapping and transforming data between MuleSoft and Salesforce, ensuring that all necessary fields and data elements are correctly aligned. Depending on the complexity and scale of the integration, this can require &lt;a href="https://www.rapidionline.com/blog/microsoft-dynamics-salesforce-integration" rel="noopener noreferrer"&gt;data integration tools&lt;/a&gt; or custom development.&lt;/p&gt;

&lt;p&gt;Security and access control should be prioritized throughout the integration process. This includes implementing secure protocols for data transmission, encrypting sensitive data, and establishing robust user authentication and authorization mechanisms. Regular audits and monitoring should also be performed to identify any potential security gaps and address them promptly&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;In conclusion, MuleSoft has revolutionized the way organizations approach data integration. With its comprehensive and flexible platform, MuleSoft has empowered businesses to connect disparate systems, streamline processes, and gain valuable insights from their data.&lt;/p&gt;

&lt;p&gt;MuleSoft can eliminate the need for custom point-to-point integration solutions by providing a unified platform for data integration. This reduces costs and development time and ensures a more efficient and scalable integration approach.&lt;/p&gt;

&lt;p&gt;If you're looking for a flexible, scalable, and future-proof data integration solution, look no further than MuleSoft. Explore MuleSoft's platform's possibilities and take your data integration to the next level.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Build a YouTube Clone in React JS: Create Your Own Video Library App from Scratch!</title>
      <dc:creator>PRANKUR PANDEY</dc:creator>
      <pubDate>Fri, 05 Apr 2024 04:57:03 +0000</pubDate>
      <link>https://dev.to/prankurpandeyy/how-to-build-your-video-library-youtube-clone-in-react-js-3jc9</link>
      <guid>https://dev.to/prankurpandeyy/how-to-build-your-video-library-youtube-clone-in-react-js-3jc9</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;YouTube is an amazing platform as it has billions of videos and creators and allows to open their channels and later monetize them to make decent money.&lt;br&gt;
Have you ever thought of building your own YouTube clone, yup I know that's too big to develop and maintain but as a side project you can definitely try it out to test your skills and feel what it is like to develop your small version of youtube with an addition to some more features on top of it.&lt;br&gt;
Today I will be guiding you to develop your version of the small YouTube app with some new features keeping all the important features of YouTube.&lt;br&gt;
I will be using the React JS, Tailwind CSS and Mock API's.&lt;/p&gt;

&lt;h1&gt;
  
  
  Folder Structure of the Project
&lt;/h1&gt;

&lt;p&gt;I will be using the standard folder structure to separate components and pages as it allows better management of files and data and improves the navigation inside the project.&lt;br&gt;
The Folder structure snippets are here you can see :&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fauda9b3lrhiefypqcox8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fauda9b3lrhiefypqcox8.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Inside the main &lt;code&gt;src&lt;/code&gt; directory  I have separated the files and folders for everything backend folder is handling the all mock backend stuff, components folder has components that I will be using in the project as React allows me to break down big pages into components and later I can also reuse the components.&lt;br&gt;
&lt;code&gt;Context&lt;/code&gt; folder has the useContext React API which is helping us in projects to manage the states the folder has useReducers code.&lt;br&gt;
The pages folder is all about pages where each page of our app is assembling the components.&lt;br&gt;
The services folder has the API calling methods there I am calling the APIs and storing the response.&lt;br&gt;
Utils contain important code and small libraries or something that is not very common.&lt;br&gt;
The rest of the files are related to projects in which the App.js file is important as it is the main file that holds the entire application.&lt;/p&gt;

&lt;h1&gt;
  
  
  Let's Build
&lt;/h1&gt;

&lt;p&gt;In the journey of building the application first, I will make all the important pages as it will give you an overview of the application like how many pages you will need and which page will host and display what type of data.&lt;br&gt;
If you have a situation where you have to show multiple pages and the count of the pages will increase with time then it would be technically impossible to make so many pages but React has a special library where you can make as many pages as you want concerning some unique URL to do so you will use React Router which allows to make dynamic pages.&lt;br&gt;
This application has :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Homepage&lt;/li&gt;
&lt;li&gt;Explore page&lt;/li&gt;
&lt;li&gt;Playlist page&lt;/li&gt;
&lt;li&gt;Liked video page&lt;/li&gt;
&lt;li&gt;Watch later page&lt;/li&gt;
&lt;li&gt;History page&lt;/li&gt;
&lt;li&gt;Account manager page&lt;/li&gt;
&lt;li&gt;Dynamic page to show each video&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Homepage
&lt;/h2&gt;

&lt;p&gt;The homepage is the place where we show what is all about the product this application does have a fancy page as it is just a small demo project but I have put the all important information in a simple banner.&lt;br&gt;
The page contains Header, footer and banner components and I will be using the same header and footer across the app.&lt;br&gt;
The homepage looks like this &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqmp68touzec59t1x6jmd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqmp68touzec59t1x6jmd.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
You can also see the React code for building the homepage&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Hero&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Sidebar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Components/IndexAllComponents&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./Homepage.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Homepage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Sidebar&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Hero&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Homepage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;How clean the code is,isnt it? That's why I follow standard coding practices and folder structure to improve the overall look of the code so that even a beginner can understand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Explore page
&lt;/h2&gt;

&lt;p&gt;The explore page has all the videos that I am getting from the backend from the mock API, the page has two sections one section has a sidebar where I kept the individual page path and another section displays the overall video in video cards.&lt;br&gt;
The page looks like this after it gets loaded :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa951xej7w2a5h6co9nrc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa951xej7w2a5h6co9nrc.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
You can also see the React code for building the Explore page&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Chips&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Sidebar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Spinner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Videocard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Components/IndexAllComponents&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useExplorePageContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/IndexAllContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./Explorepage.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Explorepage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;finalData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useExplorePageContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"explorepage-data"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Sidebar&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Chips&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"explorepage-videos-style"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Spinner&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="nx"&gt;finalData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;video&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
              &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Videocard&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;video&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;video&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;video&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;;&lt;/span&gt;
            &lt;span class="p"&gt;})&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Explorepage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component called &lt;code&gt;Explorepage&lt;/code&gt;, which is responsible for rendering a page for exploring videos. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports: The component imports necessary dependencies from external files, including React, custom components (&lt;code&gt;Chips&lt;/code&gt;, &lt;code&gt;Footer&lt;/code&gt;, &lt;code&gt;Header&lt;/code&gt;, &lt;code&gt;Sidebar&lt;/code&gt;, &lt;code&gt;Spinner&lt;/code&gt;, &lt;code&gt;Videocard&lt;/code&gt;), context (&lt;code&gt;useExplorePageContext&lt;/code&gt;), and styles (&lt;code&gt;Explorepage.css&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Function Component: The &lt;code&gt;Explorepage&lt;/code&gt; function component is defined, which returns JSX to render the explore page.&lt;/li&gt;
&lt;li&gt;useExplorePageContext: The &lt;code&gt;useExplorePageContext&lt;/code&gt; hook is used to access context related to the explore page, such as &lt;code&gt;finalData&lt;/code&gt; (list of videos to display) and &lt;code&gt;isLoading&lt;/code&gt; (loading state).&lt;/li&gt;
&lt;li&gt;Rendering Explore Page: Inside the returned JSX:

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;Header&lt;/code&gt; component is displayed at the top.&lt;/li&gt;
&lt;li&gt;The main content of the explore page is wrapped inside a &lt;code&gt;div&lt;/code&gt; with the class &lt;code&gt;explorepage-data&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Sidebar&lt;/code&gt; component is included to provide navigation options.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Chips&lt;/code&gt; component is rendered to provide filtering options or categories for videos.&lt;/li&gt;
&lt;li&gt;The video cards are displayed inside a &lt;code&gt;div&lt;/code&gt; with the class &lt;code&gt;explorepage-videos-style&lt;/code&gt;. If the page is still loading (&lt;code&gt;isLoading&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;), a &lt;code&gt;Spinner&lt;/code&gt; component is displayed. Otherwise, each video in &lt;code&gt;finalData&lt;/code&gt; is mapped to a &lt;code&gt;Videocard&lt;/code&gt; component, passing the video data as props.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Footer: Finally, the &lt;code&gt;Footer&lt;/code&gt; component is displayed at the bottom of the page.&lt;/li&gt;
&lt;li&gt;Export: The &lt;code&gt;Explorepage&lt;/code&gt; component is exported as the default export.
Overall, this code creates a structured layout for the explore page, including a header, sidebar, video cards, and footer. It dynamically renders videos fetched from the context, showing a spinner while loading. Additionally, it provides a layout that allows for easy navigation and exploration of videos.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Playlist page
&lt;/h2&gt;

&lt;p&gt;The playlist is a special where I add my favourite videos and later I can see and play them you can add multiple playlists and also add multiple videos into it.&lt;br&gt;
The playlist page is the page where I display the data of the playlist which will carry all the videos that will be played.&lt;br&gt;
On the playlist page, you view the playlists and also remove it.&lt;br&gt;
The Playlist page looks like this :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw2sfbzff866pw51g40xg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw2sfbzff866pw51g40xg.png" alt="Image description"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Here is the code snippet :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Utils/CustomUtils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;usePlaylistContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/IndexAllContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./Playlistspage.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Sidebar&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Components/IndexAllComponents&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;getPlaylistsFn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;removePlaylistFn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Services/PlaylistPageServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Playlistspage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;addToPlaylists&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setPlaylistFn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;usePlaylistContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;getPlaylistsFn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;setPlaylistFn&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;
        &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"likes-page-sidebar"&lt;/span&gt;
        &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;marginLeft&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;15rem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Sidebar&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"playlist-container"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;addToPlaylists&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h3&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"historypage-title"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
              THERE ARE NO PLAYLIST TO DISPLAY&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h3&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="nx"&gt;addToPlaylists&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
            &lt;span class="nx"&gt;addToPlaylists&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;playlistData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"playlistdata"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons playlisticon"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                    playlist_play
                  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`/playlists/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;playlistData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"playlistpage"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                      Playlist &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;playlistData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;playlistName&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;
                  &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons playlistmi"&lt;/span&gt;
                  &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
                    &lt;span class="nf"&gt;removePlaylistFn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;playlistData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setPlaylistFn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                  &lt;span class="si"&gt;}&lt;/span&gt;
                &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  delete
                &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;))&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Playlistspage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code is a React component called &lt;code&gt;Playlistspage&lt;/code&gt;, which is responsible for rendering a page displaying playlists. Here's an explanation of the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports: The component imports necessary dependencies from external files, including React, custom utilities (&lt;code&gt;Link&lt;/code&gt;, &lt;code&gt;useEffect&lt;/code&gt;), context (&lt;code&gt;usePlaylistContext&lt;/code&gt;), styles (&lt;code&gt;Playlistspage.css&lt;/code&gt;), and components (&lt;code&gt;Footer&lt;/code&gt;, &lt;code&gt;Header&lt;/code&gt;, &lt;code&gt;Sidebar&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Function Component: The &lt;code&gt;Playlistspage&lt;/code&gt; function component is defined, which returns JSX to render the playlist page.&lt;/li&gt;
&lt;li&gt;usePlaylistContext: The &lt;code&gt;usePlaylistContext&lt;/code&gt; hook is used to access playlist-related context, such as &lt;code&gt;addToPlaylists&lt;/code&gt; (list of playlists) and &lt;code&gt;setPlaylistFn&lt;/code&gt; (function to update playlists).&lt;/li&gt;
&lt;li&gt;useEffect: The &lt;code&gt;useEffect&lt;/code&gt; hook is used to perform side effects in the component. Here, it fetches playlists when the component mounts using &lt;code&gt;getPlaylistsFn&lt;/code&gt; and updates the playlist context using &lt;code&gt;setPlaylistFn&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Rendering Playlists: The component renders playlists by mapping through &lt;code&gt;addToPlaylists&lt;/code&gt; array. If there are no playlists (&lt;code&gt;addToPlaylists.length &amp;lt;= 0&lt;/code&gt;), it displays a message indicating no playlists to display. Otherwise, it maps through each playlist in &lt;code&gt;addToPlaylists&lt;/code&gt;, displaying its name and a delete icon (&lt;code&gt;material-icons&lt;/code&gt;) to remove the playlist.&lt;/li&gt;
&lt;li&gt;Sidebar and Layout: The &lt;code&gt;Sidebar&lt;/code&gt; component is included to provide navigation options. The layout is structured with a flexbox, ensuring that the sidebar and playlist container are displayed side by side.&lt;/li&gt;
&lt;li&gt;Footer and Return: Finally, the &lt;code&gt;Footer&lt;/code&gt; component is included at the bottom of the page, and the JSX for the component is returned for rendering.
Overall, this code fetches and displays playlists, allows users to navigate to individual playlists, and provides the option to delete playlists.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Liked video page
&lt;/h2&gt;

&lt;p&gt;The Liked video page is where I added or bookmarked all the videos that I liked and in future, I would like to see that again.&lt;br&gt;
The page looks like this  : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0q0t0a4n9ow3xcgglcrr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0q0t0a4n9ow3xcgglcrr.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Here is the code snippet : &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Sidebar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;SmallVideoCards&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Components/IndexAllComponents&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useLikeContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/IndexAllContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;getLikedVideosFn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;removeLikedVideosFn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Services/LikesPageServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./Likespage.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Likespage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getLikedVideos&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setLikesFn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useLikeContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;getLikedVideosFn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;setLikesFn&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;
        &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"likes-page-sidebar"&lt;/span&gt;
        &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;marginLeft&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;15rem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Sidebar&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"likes-container"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;getLikedVideos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h3&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"historypage-title"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;THERE ARE NO LIKED VIDEOS &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h3&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="nx"&gt;getLikedVideos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;like&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"likesdata"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SmallVideoCards&lt;/span&gt; &lt;span class="na"&gt;props&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;like&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;videoUrl&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;
                  &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons likesmi"&lt;/span&gt;
                  &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;removeLikedVideosFn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;like&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setLikesFn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  delete
                &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;))&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Likespage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component called &lt;code&gt;Likespage&lt;/code&gt;, which is responsible for rendering a page displaying liked videos. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports: The component imports necessary dependencies from external files, including React, custom components (&lt;code&gt;Footer&lt;/code&gt;, &lt;code&gt;Header&lt;/code&gt;, &lt;code&gt;Sidebar&lt;/code&gt;, &lt;code&gt;SmallVideoCards&lt;/code&gt;), context (&lt;code&gt;useLikeContext&lt;/code&gt;), and services (&lt;code&gt;getLikedVideosFn&lt;/code&gt;, &lt;code&gt;removeLikedVideosFn&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Function Component: The &lt;code&gt;Likespage&lt;/code&gt; function component is defined, which returns JSX to render the liked videos page.&lt;/li&gt;
&lt;li&gt;useEffect Hook: The &lt;code&gt;useEffect&lt;/code&gt; hook is used to perform side effects in the component. In this case, it fetches liked videos using the &lt;code&gt;getLikedVideosFn&lt;/code&gt; service function when the component mounts (&lt;code&gt;[]&lt;/code&gt; dependency array).&lt;/li&gt;
&lt;li&gt;Rendering Liked Videos Page: Inside the returned JSX:

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;Header&lt;/code&gt; component is displayed at the top.&lt;/li&gt;
&lt;li&gt;The main content of the liked videos page is wrapped inside a &lt;code&gt;div&lt;/code&gt; with the class &lt;code&gt;likes-page-sidebar&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Sidebar&lt;/code&gt; component is included to provide navigation options.&lt;/li&gt;
&lt;li&gt;The liked videos are displayed inside a &lt;code&gt;div&lt;/code&gt; with the class &lt;code&gt;likes-container&lt;/code&gt;. If there are no liked videos (&lt;code&gt;getLikedVideos&lt;/code&gt; length is &lt;code&gt;&amp;lt;= 0&lt;/code&gt;), a message indicating the absence of liked videos is displayed. Otherwise, each liked video in &lt;code&gt;getLikedVideos&lt;/code&gt; is mapped to a &lt;code&gt;div&lt;/code&gt; containing a &lt;code&gt;SmallVideoCards&lt;/code&gt; component to display the video and a delete button represented by a Material Icons icon.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Footer&lt;/code&gt; component is displayed at the bottom of the page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Export: The &lt;code&gt;Likespage&lt;/code&gt; component is exported as the default export.
Overall, this code creates a structured layout for the liked videos page, including a header, sidebar, video cards for liked videos, and footer. It dynamically renders liked videos fetched from the context and provides an option to delete liked videos.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Watch later page
&lt;/h2&gt;

&lt;p&gt;The Watch Later page is also similar to the Liked video page as again here I am bookmarking the videos to watch later If I don't have time to watch the video right now and I would like to see that in future while in liked video page I have watched the video and really liked it.&lt;br&gt;
here is how the page looks : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fddvw9jgdlzbkcppohgwz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fddvw9jgdlzbkcppohgwz.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
here is the code :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Utils/CustomUtils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useWatchLaterContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/IndexAllContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./Watchlaterpage.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Sidebar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;SmallVideoCards&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Components/IndexAllComponents&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;getWatchLaterVideosFn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;removeWatchLaterVideosFn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Services/WatchLaterServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Watchlaterpage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getWatchLaterVideos&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setWatchLaterFn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useWatchLaterContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;getWatchLaterVideosFn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;setWatchLaterFn&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;`&amp;lt;div&amp;gt;`&lt;/span&gt;
      &lt;span class="s2"&gt;`&amp;lt;Header /&amp;gt;`&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;
        &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;likes-page-sidebar&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
        &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;marginLeft&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;15rem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="s2"&gt;`&amp;lt;Sidebar /&amp;gt;`&lt;/span&gt;
        &lt;span class="s2"&gt;`&amp;lt;div className="watchlater-container"&amp;gt;`&lt;/span&gt;
          &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;getWatchLaterVideos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="s2"&gt;`&amp;lt;h3 className="watchlaterpage-title"&amp;gt;`&lt;/span&gt;
              &lt;span class="nx"&gt;THERE&lt;/span&gt; &lt;span class="nx"&gt;ARE&lt;/span&gt; &lt;span class="nx"&gt;NO&lt;/span&gt; &lt;span class="nx"&gt;WATCHLATER&lt;/span&gt; &lt;span class="nx"&gt;VIDEOS&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="s2"&gt;`&amp;lt;/h3&amp;gt;`&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="nx"&gt;getWatchLaterVideos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;watch_later&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="s2"&gt;`&amp;lt;div className="watchlaterdata"&amp;gt;`&lt;/span&gt;
                &lt;span class="s2"&gt;`&amp;lt;SmallVideoCards props={watch_later.videoUrl} /&amp;gt;`&lt;/span&gt;
                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt;
                  &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;material-icons watchlatermi&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
                  &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{(&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
                    &lt;span class="nf"&gt;removeWatchLaterVideosFn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;watch_later&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setWatchLaterFn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                  &lt;span class="p"&gt;}&lt;/span&gt;
                &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="k"&gt;delete&lt;/span&gt;

              &lt;span class="s2"&gt;`&amp;lt;/div&amp;gt;`&lt;/span&gt;
            &lt;span class="p"&gt;))&lt;/span&gt;
          &lt;span class="p"&gt;)}&lt;/span&gt;
        &lt;span class="s2"&gt;`&amp;lt;/div&amp;gt;`&lt;/span&gt;
      &lt;span class="s2"&gt;`&amp;lt;/div&amp;gt;`&lt;/span&gt;
      &lt;span class="s2"&gt;`&amp;lt;Footer /&amp;gt;`&lt;/span&gt;
    &lt;span class="s2"&gt;`&amp;lt;/div&amp;gt;`&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Watchlaterpage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component called &lt;code&gt;Watchlaterpage&lt;/code&gt;, responsible for rendering a page displaying videos saved to watch later. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports: The component imports necessary dependencies from external files, including &lt;code&gt;useEffect&lt;/code&gt; from custom utilities (&lt;code&gt;../../Utils/CustomUtils&lt;/code&gt;), &lt;code&gt;useWatchLaterContext&lt;/code&gt; from context (&lt;code&gt;../../Context/IndexAllContext&lt;/code&gt;), custom components (&lt;code&gt;Footer&lt;/code&gt;, &lt;code&gt;Header&lt;/code&gt;, &lt;code&gt;Sidebar&lt;/code&gt;, &lt;code&gt;SmallVideoCards&lt;/code&gt;), and services (&lt;code&gt;getWatchLaterVideosFn&lt;/code&gt;, &lt;code&gt;removeWatchLaterVideosFn&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Function Component: The &lt;code&gt;Watchlaterpage&lt;/code&gt; function component is defined, which returns JSX to render the watch later videos page.&lt;/li&gt;
&lt;li&gt;useEffect Hook: The &lt;code&gt;useEffect&lt;/code&gt; hook is used to perform side effects in the component. In this case, it fetches watch later videos using the &lt;code&gt;getWatchLaterVideosFn&lt;/code&gt; service function when the component mounts (&lt;code&gt;[]&lt;/code&gt; dependency array).&lt;/li&gt;
&lt;li&gt;Rendering Watch Later Videos Page: Inside the returned JSX:

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;Header&lt;/code&gt; component is displayed at the top.&lt;/li&gt;
&lt;li&gt;The main content of the watch later videos page is wrapped inside a &lt;code&gt;div&lt;/code&gt; with the class &lt;code&gt;likes-page-sidebar&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Sidebar&lt;/code&gt; component is included to provide navigation options.&lt;/li&gt;
&lt;li&gt;The watch later videos are displayed inside a &lt;code&gt;div&lt;/code&gt; with the class &lt;code&gt;watchlater-container&lt;/code&gt;. If there are no watch later videos (&lt;code&gt;getWatchLaterVideos&lt;/code&gt; length is &lt;code&gt;&amp;lt;= 0&lt;/code&gt;), a message indicating the absence of watch later videos are displayed. Otherwise, each watch later video in &lt;code&gt;getWatchLaterVideos&lt;/code&gt; is mapped to a &lt;code&gt;div&lt;/code&gt; containing a &lt;code&gt;SmallVideoCards&lt;/code&gt; component to display the video and a delete button represented by a Material Icons icon.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Footer&lt;/code&gt; component is displayed at the bottom of the page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Export: The &lt;code&gt;Watchlaterpage&lt;/code&gt; component is exported as the default export.
Overall, this code creates a structured layout for the Watch Later videos page, including a header, sidebar, video cards for Watch Later videos, and footer. It dynamically renders watch later videos fetched from the context and provides an option to remove them from the watch later list.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  History page
&lt;/h2&gt;

&lt;p&gt;History is the past that I have viewed already or seen the same goes for the history page for the videos I have watched or performed any action on such as liking or adding the videos to watch list.&lt;br&gt;
Here is what the history page looks like :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkil5wodnaj6cxxf9uu76.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkil5wodnaj6cxxf9uu76.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
here is the code snippet : &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useEffect } from "../../Utils/CustomUtils";
import {
  useExplorePageContext,
  useHistoryContext,
} from "../../Context/IndexAllContext";
import "./Historypage.css";
import {
  Footer,
  Header,
  Sidebar,
  SmallVideoCards,
} from "../../Components/IndexAllComponents";
import {
  getHistoryFn,
  removeAllHistoryFn,
  removeVideoFromHistoryFn,
} from "../../Services/HistoryPageServices";
function Historypage() {
  const { getHistory, setHistoryFn } = useHistoryContext();
  const { finalData } = useExplorePageContext();
  useEffect(() =&amp;gt; {
    getHistoryFn(setHistoryFn);
  }, [finalData]);
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;Header /&amp;gt;
      &amp;lt;div
        className="likes-page-sidebar"
        style={{ display: "flex", marginLeft: "15rem" }}
      &amp;gt;
        &amp;lt;Sidebar /&amp;gt;
        &amp;lt;div className="watchlater-container"&amp;gt;
          &amp;lt;button
            className="btn btn-danger clearallhistory"
            onClick={() =&amp;gt; removeAllHistoryFn(setHistoryFn)}
          &amp;gt;
            clear history
          &amp;lt;/button&amp;gt;
          {getHistory.length &amp;lt;= 0 ? (
            &amp;lt;h3 className="historypage-title"&amp;gt;
              {" "}
              THE HISTORY IS EMPTY , WATCH SOMETHING TO ADD HERE{" "}
            &amp;lt;/h3&amp;gt;
          ) : (
            getHistory.map((history) =&amp;gt; (
              &amp;lt;div className="watchlaterdata"&amp;gt;
                &amp;lt;SmallVideoCards props={history.videoUrl} /&amp;gt;
                &amp;lt;span
                  className="material-icons watchlatermi"
                  onClick={(_id) =&amp;gt;
                    removeVideoFromHistoryFn(history._id, setHistoryFn)
                  }
                &amp;gt;
                  delete
                &amp;lt;/span&amp;gt;
              &amp;lt;/div&amp;gt;
            ))
          )}
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;Footer /&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
export default Historypage;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code represents a React component for displaying a user's browsing history, typically related to watched videos. Here's a breakdown of what each part of the code does:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports: The component imports necessary dependencies including &lt;code&gt;useEffect&lt;/code&gt; from CustomUtils, various context hooks (&lt;code&gt;useExplorePageContext&lt;/code&gt; and &lt;code&gt;useHistoryContext&lt;/code&gt;) from IndexAllContext, and UI components and services from respective directories.&lt;/li&gt;
&lt;li&gt;CSS: The component imports a CSS file named &lt;code&gt;Historypage.css&lt;/code&gt; for styling purposes.&lt;/li&gt;
&lt;li&gt;Function Component: &lt;code&gt;Historypage&lt;/code&gt; is a functional component that renders JSX. It fetches and displays the user's browsing history.&lt;/li&gt;
&lt;li&gt;Context Usage: It uses the &lt;code&gt;useHistoryContext&lt;/code&gt; hook to access the user's browsing history and a setter function to update it. Additionally, it utilizes the &lt;code&gt;useExplorePageContext&lt;/code&gt; hook to access the &lt;code&gt;finalData&lt;/code&gt;, which likely contains information about the videos the user has watched.&lt;/li&gt;
&lt;li&gt;useEffect Hook: The &lt;code&gt;useEffect&lt;/code&gt; hook is used to fetch the user's browsing history when the &lt;code&gt;finalData&lt;/code&gt; changes. This ensures that the history is updated whenever the user watches a new video.&lt;/li&gt;
&lt;li&gt;Rendering: The component renders a header, a sidebar, and a list of watched videos. If the history is empty, it displays a message prompting the user to watch something to add to their history. Otherwise, it displays the list of watched videos along with a button to clear all history.&lt;/li&gt;
&lt;li&gt;Event Handling: Click events are attached to the "clear history" button and the delete icon next to each video. Clicking the "clear history" button triggers the &lt;code&gt;removeAllHistoryFn&lt;/code&gt; function to remove all history entries. Clicking the delete icon triggers the &lt;code&gt;removeVideoFromHistoryFn&lt;/code&gt; function to remove the corresponding video from the history.&lt;/li&gt;
&lt;li&gt;Footer: Finally, the component renders a footer.
Overall, this component efficiently manages the user's browsing history, providing options to view, clear, and interact with the history entries. It effectively utilizes React hooks and context for state management and renders a user-friendly interface for the browsing history feature.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Account manager page
&lt;/h2&gt;

&lt;p&gt;The account manager page shows the data related to your account where I am showing how many videos I have liked, how many playlists I have created and how many notes I have taken so far, yes  I have integrated one additional feature.&lt;br&gt;
Here is what the page looks like : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ogl2djosqbsw74kes35.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ogl2djosqbsw74kes35.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
the code snippet : &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {
  Accountdetails,
  Footer,
  Header,
  Sidebar,
} from "../../Components/IndexAllComponents";
function Accountpage() {
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;Header /&amp;gt;
      &amp;lt;div
        className="account-page-sidebar"
        style={{ display: "flex", marginLeft: "25rem" }}
      &amp;gt;
        &amp;lt;Sidebar /&amp;gt;
        &amp;lt;Accountdetails /&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;Footer /&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
export default Accountpage;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code represents a React component named &lt;code&gt;Accountpage&lt;/code&gt; responsible for rendering the user's account details page. Here's a breakdown of what each part of the code does:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports: The component imports necessary UI components (&lt;code&gt;Accountdetails&lt;/code&gt;, &lt;code&gt;Footer&lt;/code&gt;, &lt;code&gt;Header&lt;/code&gt;, &lt;code&gt;Sidebar&lt;/code&gt;) from the &lt;code&gt;IndexAllComponents&lt;/code&gt; module.&lt;/li&gt;
&lt;li&gt;Function Component: &lt;code&gt;Accountpage&lt;/code&gt; is a functional component that renders JSX. It composes the account page layout using imported UI components.&lt;/li&gt;
&lt;li&gt;Rendering: Within the &lt;code&gt;div&lt;/code&gt; element, it renders the following components in order:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;Header /&amp;gt;&lt;/code&gt;: Renders the header component, typically containing navigation links or branding elements.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;Sidebar /&amp;gt;&lt;/code&gt;: Renders the sidebar component, which likely provides navigation options or secondary functionalities related to the account page.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;Accountdetails /&amp;gt;&lt;/code&gt;: Renders the account details component, which presumably displays information such as user profile data, settings, or subscription details.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;Footer /&amp;gt;&lt;/code&gt;: Renders the footer component, which often contains links, copyright information, or additional navigation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Styling: Inline styling is applied to the container div to position the sidebar with a left margin of 25rem. This ensures proper alignment and layout of the sidebar and account details components.&lt;/li&gt;
&lt;li&gt;Export: The &lt;code&gt;Accountpage&lt;/code&gt; component is exported as the default export, making it accessible for use in other parts of the application.
Overall, this component encapsulates the structure and layout of the account page, combining various UI components to provide a cohesive user experience for viewing and managing account details.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Dynamic page to show videos
&lt;/h2&gt;

&lt;p&gt;When you land on the explore page you see all the listed videos from the backend now you want to see the video and also wish to like it or don't have time to watch it right now so you want to add it into watch later,so technically it's not practical to give all these features on explore page therefore having a separate age will give more sense for each video&lt;br&gt;
the dynamic page to show videos comes into the picture and this page is created where you do all the actions and also add the notes if you wish to note down something from the video.&lt;br&gt;
You can take notes, see the notes and also delete it.&lt;br&gt;
here how the page looks like :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figl2uu0wcg1zy16ik9f3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figl2uu0wcg1zy16ik9f3.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
the code snippet :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from "react";
import {
  Footer,
  Header,
  Sidebar,
  SingleVideo,
} from "../../Components/IndexAllComponents";
import "./SingleVideopage.css";
function SingleVideopage() {
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;Header /&amp;gt;
      &amp;lt;div className="sidebar-single-video"&amp;gt;
        &amp;lt;Sidebar /&amp;gt;
        &amp;lt;SingleVideo /&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;Footer /&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
export default SingleVideopage;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code represents a React component named &lt;code&gt;SingleVideopage&lt;/code&gt;, which is responsible for rendering a page displaying a single video. Here's a breakdown of the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports: The component imports necessary UI components (&lt;code&gt;Footer&lt;/code&gt;, &lt;code&gt;Header&lt;/code&gt;, &lt;code&gt;Sidebar&lt;/code&gt;, &lt;code&gt;SingleVideo&lt;/code&gt;) from the &lt;code&gt;IndexAllComponents&lt;/code&gt; module. These components are likely responsible for rendering the layout, navigation, and content related to the single video page.&lt;/li&gt;
&lt;li&gt;Function Component: &lt;code&gt;SingleVideopage&lt;/code&gt; is a functional component that renders JSX. It composes the single video page layout using the imported UI components.&lt;/li&gt;
&lt;li&gt;Rendering: Within the &lt;code&gt;div&lt;/code&gt; element, it renders the following components in order:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;Header /&amp;gt;&lt;/code&gt;: Renders the header component, which typically contains navigation links or branding elements.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;Sidebar /&amp;gt;&lt;/code&gt;: Renders the sidebar component, which likely provides navigation options or related videos/thumbnails.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;SingleVideo /&amp;gt;&lt;/code&gt;: Renders the single video component, which displays the main content of the page, such as the video player and associated metadata.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;Footer /&amp;gt;&lt;/code&gt;: Renders the footer component, which often contains links, copyright information, or additional navigation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Styling: The CSS class &lt;code&gt;sidebar-single-video&lt;/code&gt; is applied to the container &lt;code&gt;div&lt;/code&gt; to style the layout of the sidebar and single video components. The actual styles are defined in an external CSS file (&lt;code&gt;SingleVideopage.css&lt;/code&gt;), which is imported at the top of the file.&lt;/li&gt;
&lt;li&gt;Export: The &lt;code&gt;SingleVideopage&lt;/code&gt; component is exported as the default export, making it accessible for use in other parts of the application.
Overall, this component encapsulates the structure and layout of the single video page, combining various UI components to provide a cohesive user experience for viewing specific video content.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Inside the video card :
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Link } from "../../Utils/CustomUtils";
import {
  useHistoryContext,
  useSingleVideoContext,
} from "../../Context/IndexAllContext";
import "./Videocard.css";
import { addToHistoryFn } from "../../Services/HistoryPageServices";
function Videocard({ video }) {
  const { id, title, videoUrl, creatorpic } = video;
  const { setHistoryFn } = useHistoryContext();
  const { videoData } = useSingleVideoContext();
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;div className="video__cards"&amp;gt;
        &amp;lt;div class="card-wrapper video-card"&amp;gt;
          &amp;lt;div&amp;gt;
            &amp;lt;embed class="iframe-video" src={videoUrl} title="video"&amp;gt;&amp;lt;/embed&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;Link to={`/explore/${_id}`}&amp;gt;
            &amp;lt;div className="video__cards-details"&amp;gt;
              &amp;lt;div className="video__cards-image"&amp;gt;
                &amp;lt;img src={creator_pic} alt="images" className="" /&amp;gt;
              &amp;lt;/div&amp;gt;
              &amp;lt;div
                className="video__cards-title"
                onClick={() =&amp;gt; addToHistoryFn(videoData, setHistoryFn)}
              &amp;gt;
                &amp;lt;h3&amp;gt;{title} &amp;lt;/h3&amp;gt;
              &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
          &amp;lt;/Link&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
export default Videocard;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component called &lt;code&gt;Videocard&lt;/code&gt;, which represents a card displaying information about a video. Here's a breakdown of the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Link&lt;/code&gt;: This component is imported from the &lt;code&gt;CustomUtils&lt;/code&gt; module, likely for routing purposes.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;useHistoryContext&lt;/code&gt; and &lt;code&gt;useSingleVideoContext&lt;/code&gt;: These are custom hooks imported from the &lt;code&gt;IndexAllContext&lt;/code&gt; module. They are used to access and manipulate state related to the user's browsing history and the currently selected single video, respectively.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;addToHistoryFn&lt;/code&gt;: This function is imported from the &lt;code&gt;HistoryPageServices&lt;/code&gt; module. It is likely used to add a video to the user's browsing history.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Function Component:

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;Videocard&lt;/code&gt; component is a functional component that accepts a &lt;code&gt;video&lt;/code&gt; object as a prop.&lt;/li&gt;
&lt;li&gt;Within the component, destructuring is used to extract specific properties (&lt;code&gt;_id&lt;/code&gt;, &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;videoUrl&lt;/code&gt;, &lt;code&gt;creator_pic&lt;/code&gt;) from the &lt;code&gt;video&lt;/code&gt; object.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Rendering:

&lt;ul&gt;
&lt;li&gt;The component renders JSX to represent a video card.&lt;/li&gt;
&lt;li&gt;It consists of a &lt;code&gt;div&lt;/code&gt; with the class &lt;code&gt;video__cards&lt;/code&gt;, which contains a card-wrapper (&lt;code&gt;div&lt;/code&gt; with the class &lt;code&gt;card-wrapper video-card&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Inside the card wrapper, an &lt;code&gt;embed&lt;/code&gt; element is used to embed the video specified by the &lt;code&gt;videoUrl&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The video card also includes details such as the creator's profile picture (&lt;code&gt;creator_pic&lt;/code&gt;) and the video title (&lt;code&gt;title&lt;/code&gt;). These details are wrapped inside a &lt;code&gt;Link&lt;/code&gt; component, which likely links to the video's detailed page (&lt;code&gt;/explore/${_id}&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;An &lt;code&gt;onClick&lt;/code&gt; event handler is attached to the &lt;code&gt;video__cards-title&lt;/code&gt; element. When clicked, it calls the &lt;code&gt;addToHistoryFn&lt;/code&gt; function with the &lt;code&gt;videoData&lt;/code&gt; and &lt;code&gt;setHistoryFn&lt;/code&gt; arguments.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Styling:

&lt;ul&gt;
&lt;li&gt;The CSS class &lt;code&gt;video__cards&lt;/code&gt; is applied to style the overall layout of the video card.&lt;/li&gt;
&lt;li&gt;Additional styling is applied using external CSS defined in the &lt;code&gt;Videocard.css&lt;/code&gt; file.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Export:
The &lt;code&gt;Videocard&lt;/code&gt; component is exported as the default export, making it available for use in other parts of the application.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Note-taking functionality :
&lt;/h3&gt;

&lt;p&gt;I believe in development as a real software engineer is the responsibility to handle the application development therefore in this application, I have added a small feature on top of the app this feature allows you to take notes while watching the videos, you can see the notes on the same page where you are watching the videos and also delete it, there's no rich text support for the taking notes will be completely in plain text.&lt;br&gt;
   the code snippet:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   import React from "react";
   import {
     useNotesAppContext,
     useSingleVideoContext,
   } from "../../Context/IndexAllContext";
   import "./NoteTaking.css";
   function NoteTaking() {
     const { notesTakingBoxState } = useSingleVideoContext();
     const {
       inputNotesTextValue,
       setinputNotesTextValue,
       saveNotesFn,
       inputNotesData,
       deleteNotesFn,
       editNotesFn,
       buttonState,
     } = useNotesAppContext();
     return (
       &amp;lt;div
         className="notes-container"
         style={{
           display: notesTakingBoxState,
         }}
       &amp;gt;
         &amp;lt;div class="form-data"&amp;gt;
           &amp;lt;form onSubmit={saveNotesFn}&amp;gt;
             &amp;lt;input
               type="text"
               className="notes-app"
               value={inputNotesTextValue}
               onChange={(e) =&amp;gt; setinputNotesTextValue(e.target.value)}
               required
               placeholder="take notes "
             /&amp;gt;
             &amp;lt;input type="submit" class="submit-notes" /&amp;gt;
           &amp;lt;/form&amp;gt;
           &amp;lt;div&amp;gt;
             &amp;lt;div&amp;gt;
               &amp;lt;table&amp;gt;
                 &amp;lt;tr&amp;gt;
                   &amp;lt;th className="notes-data"&amp;gt;Notes&amp;lt;/th&amp;gt;
                   &amp;lt;th&amp;gt;
                     &amp;lt;span class="notesmi"&amp;gt;Action&amp;lt;/span&amp;gt;
                     {/* &amp;lt;span class="material-icons notesmi"&amp;gt;edit&amp;lt;/span&amp;gt; */}
                   &amp;lt;/th&amp;gt;
                 &amp;lt;/tr&amp;gt;
                 {inputNotesData.map((text) =&amp;gt; (
                   &amp;lt;tr&amp;gt;
                     &amp;lt;td className="notes-data"&amp;gt; {text.inputNotesTextValue} &amp;lt;/td&amp;gt;
                     &amp;lt;td&amp;gt;
                       {/* &amp;lt;button className="btns"&amp;gt;
                         &amp;lt;span
                           class="material-icons notesmi"
                           onClick={(_id) =&amp;gt; editNotesFn(text._id)}
                         &amp;gt;
                           edit
                         &amp;lt;/span&amp;gt;
                       &amp;lt;/button&amp;gt; */}
                       &amp;lt;span
                         class="material-icons notesmi"
                         onClick={(_id) =&amp;gt; deleteNotesFn(text._id)}
                       &amp;gt;
                         delete
                       &amp;lt;/span&amp;gt;
                     &amp;lt;/td&amp;gt;
                   &amp;lt;/tr&amp;gt;
                 ))}
               &amp;lt;/table&amp;gt;
             &amp;lt;/div&amp;gt;
           &amp;lt;/div&amp;gt;
         &amp;lt;/div&amp;gt;
       &amp;lt;/div&amp;gt;
     );
   }
   export default NoteTaking;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component called &lt;code&gt;NoteTaking&lt;/code&gt;, which represents a note-taking feature within a larger application. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;useNotesAppContext&lt;/code&gt; and &lt;code&gt;useSingleVideoContext&lt;/code&gt;: These are custom hooks imported from the &lt;code&gt;IndexAllContext&lt;/code&gt; module. They are used to access and manipulate states related to note-taking functionality and the context of a single video, respectively.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Function Component:

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;NoteTaking&lt;/code&gt; component is a functional component that doesn't receive any props.&lt;/li&gt;
&lt;li&gt;Inside the component, destructuring is used to extract specific values from the &lt;code&gt;useSingleVideoContext&lt;/code&gt; and &lt;code&gt;useNotesAppContext&lt;/code&gt; hooks.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Rendering:

&lt;ul&gt;
&lt;li&gt;The component renders JSX to represent a note-taking interface.&lt;/li&gt;
&lt;li&gt;It consists of a &lt;code&gt;div&lt;/code&gt; with the class &lt;code&gt;notes-container&lt;/code&gt;, which has its display property determined by the &lt;code&gt;notesTakingBoxState&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Inside the container, there's a form for inputting notes. The form's submission is handled by the &lt;code&gt;saveNotesFn&lt;/code&gt; function.&lt;/li&gt;
&lt;li&gt;Below the form, there's a table displaying the existing notes (&lt;code&gt;inputNotesData&lt;/code&gt;). Each note is rendered as a row in the table.&lt;/li&gt;
&lt;li&gt;Each note includes its text in the first column (&lt;code&gt;td&lt;/code&gt;) and an action (such as deletion) in the second column.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Event Handling:

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;onChange&lt;/code&gt; event of the input field updates the &lt;code&gt;inputNotesTextValue&lt;/code&gt; state with the typed note text.&lt;/li&gt;
&lt;li&gt;Clicking the submit button triggers the &lt;code&gt;saveNotesFn&lt;/code&gt; function to save the note.&lt;/li&gt;
&lt;li&gt;Clicking the delete icon triggers the &lt;code&gt;deleteNotesFn&lt;/code&gt; function to remove the corresponding note.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Styling:

&lt;ul&gt;
&lt;li&gt;The component applies to style using the &lt;code&gt;NoteTaking.css&lt;/code&gt; file, which likely contains CSS rules for layout and presentation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Export:
The &lt;code&gt;NoteTaking&lt;/code&gt; component is exported as the default export, making it available for use in other parts of the application.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion :
&lt;/h2&gt;

&lt;p&gt;Finally, I thoroughly enjoyed building this small YouTube clone as it has given me a deeper understanding of React development and various other tools of the React ecosystem, here is the breakdown of the technologies I have learned  : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ReactJS&lt;/li&gt;
&lt;li&gt;React Router v6&lt;/li&gt;
&lt;li&gt;React Context API and useReducer&lt;/li&gt;
&lt;li&gt;React Player&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://slateui.netlify.app/" rel="noopener noreferrer"&gt;Slate UI&lt;/a&gt; - CSS Component Library&lt;/li&gt;
&lt;li&gt;MockBee&lt;/li&gt;
&lt;li&gt;React Hot Toast
here is the feature list of the application :&lt;/li&gt;
&lt;li&gt;Video Listing page&lt;/li&gt;
&lt;li&gt;Like/dislike a video&lt;/li&gt;
&lt;li&gt;Playlist Management&lt;/li&gt;
&lt;li&gt;Watchlater Management&lt;/li&gt;
&lt;li&gt;History Management&lt;/li&gt;
&lt;li&gt;Filter videos by category&lt;/li&gt;
&lt;li&gt;Sort videos by date&lt;/li&gt;
&lt;li&gt;Search videos&lt;/li&gt;
&lt;li&gt;Authentication&lt;/li&gt;
&lt;li&gt;Take/Delete Notes
Thanks for Reading it you can see the complete code on &lt;a href="https://github.com/prankurpandeyy/Slate-Store/tree/development/agri-store-react/src" rel="noopener noreferrer"&gt;github&lt;/a&gt; and can browse the project &lt;a href="https://github.com/prankurpandeyy/Slate-Video-Library/tree/development/slate-video-library" rel="noopener noreferrer"&gt;here&lt;/a&gt;
If you have anything to share with me or want me to develop some web app I am always open to opportunities you can connect here on &lt;a href="https://www.linkedin.com/in/prankurpandeyy/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Build a Full-Stack E-Commerce React App from Scratch: The Ultimate Guide</title>
      <dc:creator>PRANKUR PANDEY</dc:creator>
      <pubDate>Fri, 29 Mar 2024 04:42:52 +0000</pubDate>
      <link>https://dev.to/prankurpandeyy/ultimate-guide-to-building-an-e-commerce-store-with-react-js-and-mock-apis-2c7i</link>
      <guid>https://dev.to/prankurpandeyy/ultimate-guide-to-building-an-e-commerce-store-with-react-js-and-mock-apis-2c7i</guid>
      <description>&lt;h2&gt;
  
  
  Introduction :
&lt;/h2&gt;

&lt;p&gt;The increasing demand for user-friendly, feature-rich e-commerce platforms has become viral whether it's Amazon, Walmart, or Shopify everyone is shifting to become a self-hosted e-commerce platform to sell and arrange better goods online without annoying customers to visit physical shops to purchase anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Project :
&lt;/h2&gt;

&lt;p&gt;I am too much tech-friendly as I believe that technology can solve anything so I started learning about it and eventually got into web development I chose React JS to build something to practice my skills while gaining a deep understanding of the core concepts of React JS &amp;amp; its entire ecosystem.&lt;/p&gt;

&lt;p&gt;I wanted to build some real-world applications so that recruiters and other people could relate to them easily therefore I developed Agri Store a basic E-commerce platform to utilize the power of React JS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Goals :
&lt;/h2&gt;

&lt;p&gt;The goal was to dig deeper by coding a lot into it I intend to showcase the capabilities of React JS, React Router v6, Context API, MockBee, TailwindCSS, React Hot Toast, and integrate features like product listings, sorting/filtering, authentication, cart/wishlist management, payment processing, and purchase history.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Structure and Key Features :
&lt;/h2&gt;

&lt;p&gt;I wanted to industry-level best practices by separating the projects into folders and the folder structure is as follows:&lt;/p&gt;

&lt;p&gt;The SRC folder: As you all know React JS has a separate source (src) folder that contains all the logic and UI parts and by combining everything we link everything to the main App JS FILE which serves the index.html file It also the main source file.&lt;/p&gt;

&lt;p&gt;The Component Folder: Components are a small amount of UI for the entire page instead of making the same component repetitively if it is being used multiple times we create it once and call it anywhere on any page.&lt;/p&gt;

&lt;p&gt;The Context Folder: The context Folder is responsible for managing the states in the entire application it helps to clean the code separately and create the files and folders concerning the feature we are building.&lt;/p&gt;

&lt;p&gt;The Pages Folder: Pages are nothing different than other web pages in React JS instead of building the entire pages in one go we break the pages into smaller components.&lt;/p&gt;

&lt;p&gt;The Services Folder: The services folder contains all the backend data which can be hosted as a JSON file or it can also be retrieved from an API.&lt;/p&gt;

&lt;p&gt;The UTILS Folder: Utils or utility folder generally contains the main or supported libraries code in one file making your code much cleaner and easy to read and understand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decoding Page Structure :
&lt;/h2&gt;

&lt;p&gt;My Project contains multiple pages as I have also implanted dynamic routing enabling users to see the product details in separate pages.&lt;/p&gt;

&lt;p&gt;I have added the following pages to my work&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Landing or Homepage to showcase what I am offering&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Product Listing Page to display how many products I have along with their values and a sidebar section to filter out the products based on their price, rating &amp;amp; availability&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dynamic Product Listing page for each product&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cart Page along with the checkout button you can also increase and decrease the quantity of product and remove it as well from the cart&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Order &amp;amp; address manager page with the option to add an address and proceed with payment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Order Confirmation page that your order has been received successfully.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Wishlist page to add products for future reference.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Profile manager page where you can see the order you have purchased, the address you have added, and your profile information under the separate tabs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Authentication page for user login and signup along with mock login credentials.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz7m7zwwve3tydt9xwz6w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz7m7zwwve3tydt9xwz6w.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Decoding the Entire project :
&lt;/h2&gt;

&lt;p&gt;First I would like to disclose the common components that are being used everywhere in the project I will also add the code snippets along with the explanations&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Header across the app
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Utils/CustomUtils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;useCartContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;useFilterContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;useWishlistContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/AllContextIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;isMenuOpen&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setIsMenuOpen&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;cart&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useCartContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;wish&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useWishlistContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useFilterContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;token&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;" flex flex-row items-center justify-between w-full p-2 sm:px-4 shadow-xl shadow-xs bg-gray-700 fixed-top top"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"ml-8 text-lg text-white hidden md:flex"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Car-kit&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-full md:w-1/3 h-10 cursor-pointer border border-gray-300 text-sm rounded-full flex"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"search"&lt;/span&gt; &lt;span class="na"&gt;onChange&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;SEARCHBAR&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Search"&lt;/span&gt;

&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex-grow px-4 rounded-l-full rounded-r-full text-sm focus:outline-none"&lt;/span&gt;

&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex text-white text-2xl "&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex w-48 justify-between "&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/ProductListingPage"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons "&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; store &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/WishlistPage"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons "&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; favorite&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-4 h-4 rounded-full text-center absolute leading text-xs bg-red-500"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;wish&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"navbadge"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/CartPage"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; shopping_cart &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-4 h-4 rounded-full text-center absolute leading text-xs bg-red-500"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;token&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/LoginPage"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons "&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; login &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/Accountpage"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons "&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; account_circle &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code is a React component called Header which likely represents a header section of a website or web application. Let's break down the code step by step:&lt;/p&gt;

&lt;p&gt;Imports: The code imports necessary modules and functions from other files. It imports React, Link, and useState from "../../Utils/CustomUtils", and imports custom context hooks useCartContext, useFilterContext, and useWishlistContext from "../../Context/AllContextIndex".&lt;/p&gt;

&lt;p&gt;Function Component Header: This is the main React function component named Header.&lt;/p&gt;

&lt;p&gt;State Management: It uses the useState hook to manage the state of isMenuOpen, initializing it with false.&lt;/p&gt;

&lt;p&gt;Context Usage: It uses the custom context hooks (useCartContext, useFilterContext, useWishlistContext) to get the state values (cart, wish, dispatch) from the respective contexts.&lt;/p&gt;

&lt;p&gt;Token Retrieval: It retrieves a token from the localStorage. This token might be used for authentication purposes.&lt;/p&gt;

&lt;p&gt;JSX Rendering: It returns JSX elements to render the header section. The header consists of various elements such as links, search bar, icons, etc.&lt;/p&gt;

&lt;p&gt;Dynamic Content: It dynamically displays the length of the wishlist and cart by accessing the length of wish and cart arrays respectively.&lt;/p&gt;

&lt;p&gt;Conditional Rendering: It conditionally renders a login link or an account link based on the presence of a token.&lt;/p&gt;

&lt;p&gt;Event Handling:  It attaches an onChange event handler to the search input field, which dispatches an action with the type "SEARCHBAR" and the input value as the payload when the user types in the search bar.&lt;/p&gt;

&lt;p&gt;CSS Styling: Inline CSS classes are used to style the elements. Classes like flex, items-center, justify-between, w-full, etc., are applied to structure and style the header section.&lt;/p&gt;

&lt;p&gt;Overall, this code represents a header component with navigation links, a search bar, icons for wishlist, cart, and login/account, and dynamic content based on the user's actions.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Footer across the app
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Utils/CustomUtils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Utils/CustomCSSUtils.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-gray-400 bg-gray-900 body-font fixed bottom-0 w-full"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"container px-5 py-8 mx-auto flex items-center sm:flex-row flex-col "&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex title-font font-medium items-center md:justify-start justify-center text-white"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="na"&gt;xmlns&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"http://www.w3.org/2000/svg"&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt; &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke-linecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-linejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-10 h-10 text-white p-2 bg-red-500 rounded-full"&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"ml-3 text-xl"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;CarSale&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-sm text-gray-400 sm:ml-4 sm:pl-4 sm:border-l-2 sm:border-gray-800 sm:py-2 sm:mt-0 mt-4"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;© 2023 CarSale —

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://prankurpandeyy.netlify.com"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-gray-500 ml-1"&lt;/span&gt; &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"_blank"&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"noopener noreferrer"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;@prankurpandeyy&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"inline-flex sm:ml-auto sm:mt-0 mt-4 justify-center sm:justify-start"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-gray-400"&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://fb.com/prankurpandeyy"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke-linecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-linejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-5 h-5"&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M18 2h-3a5 5 0 00-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 011-1h3z"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"ml-3 text-gray-400"&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://twitter.com/prankurpandeyy"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke-linecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-linejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-5 h-5"&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M23 3a10.9 10.9 0 01-3.14 1.53 4.48 4.48 0 00-7.86 3v1A10.66 10.66 0 013 4s-4 9 5 13a11.64 11.64 0 01-7 2c9 5 20 0 20-11.5a4.5 4.5 0 00-.08-.83A7.72 7.72 0 0023 3z"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"ml-3 text-gray-400"&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://instagram.com/prankurpandeyy"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt; &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke-linecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-linejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-5 h-5"&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;rect&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"20"&lt;/span&gt; &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"20"&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;rx&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"5"&lt;/span&gt; &lt;span class="na"&gt;ry&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"5"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;rect&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M16 11.37A4 4 0 1112.63 8 4 4 0 0116 11.37zm1.5-4.87h.01"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"ml-3 text-gray-400"&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://linkedin.com/in/prankurpandeyy"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke-linecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-linejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-5 h-5"&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M16 8a6 6 0 016 6v7h-4v-7a2 2 0 00-2-2 2 2 0 00-2 2v7h-4v-7a6 6 0 016-6zM2 9h4v12H2z"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;circle&lt;/span&gt; &lt;span class="na"&gt;cx&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"4"&lt;/span&gt; &lt;span class="na"&gt;cy&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"4"&lt;/span&gt; &lt;span class="na"&gt;r&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;circle&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;footer&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component called &lt;code&gt;Footer&lt;/code&gt;, which likely represents the footer section of a website or web application. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;import React from "../../Utils/CustomUtils";&lt;/code&gt;: Imports the &lt;code&gt;React&lt;/code&gt; module from &lt;code&gt;"../../Utils/CustomUtils"&lt;/code&gt;. This import is not used directly in the component but is typically required in every React component file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;import "../../Utils/CustomCSSUtils.css";&lt;/code&gt;: Imports a CSS file named &lt;code&gt;"CustomCSSUtils.css"&lt;/code&gt; from the &lt;code&gt;"../../Utils"&lt;/code&gt; directory. This CSS file is likely used to style elements within the footer component.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Function Component Footer:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;This is the main React function component named &lt;code&gt;Footer&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It returns JSX elements to render the footer section.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;JSX Rendering:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The footer consists of various elements such as a logo, text, links to social media profiles, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The logo is an SVG image wrapped in an anchor (&lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;) tag.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Text content includes the name of the website and copyright information.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Social media links are represented by SVG icons wrapped in anchor tags (&lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;CSS Classes:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Inline CSS classes are used to style the elements. Classes like &lt;code&gt;text-gray-400&lt;/code&gt;, &lt;code&gt;bg-gray-900&lt;/code&gt;, &lt;code&gt;px-5&lt;/code&gt;, &lt;code&gt;py-8&lt;/code&gt;, etc., are applied to structure and style the footer section.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Additionally, classes from the imported CSS file (&lt;code&gt;CustomCSSUtils.css&lt;/code&gt;) may also be applied to style certain elements.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Export:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;export { Footer };&lt;/code&gt;: This line exports the &lt;code&gt;Footer&lt;/code&gt; component, making it available for import in other files. By exporting the &lt;code&gt;Footer&lt;/code&gt; component, you make it accessible for use in other parts of your application.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, this code represents a footer component with branding, text content, and links to social media profiles, styled using CSS classes.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Product Cards from the product listing page to the wishlist &amp;amp; checkout page :
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useNavigate&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Utils/CustomUtils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;useWishlistContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;useCartContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;useProductContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/AllContextIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;addToCart&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;removeFromCart&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Services/CartServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;addToWishlist&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;deleteWishList&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Services/WishlistServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./ProductCard.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ProductCard&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;productCardData&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;rating&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;inStock&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;productCardData&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;wish&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useWishlistContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useProductContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;cart&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useCartContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;navigate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useNavigate&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;token&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-full h-full flex justify-center items-center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"relative p-4 flex justify-center rounded-xl cursor-pointer"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"top-0 left-0 mt-3 px-2 rounded-lg absolute z-30 bg-green-500 text-gray-100 text-xs md:text-sm font-medium md:block"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;inStock&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;`in Stock`&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`out of stock`&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"top-0 left-0 h-2 md:h-3 mt-5 px-2 absolute z-20 bg-green-500"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"top-0 left-0 h-2 md:h-3 mt-6 pl-5 rounded-3xl absolute z-0 bg-green-600"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-52 pb-2 bg-white rounded-xl z-10"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"relative"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"max-h-60 object-cover rounded-t-xl"&lt;/span&gt; &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"px-2 py-1"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`/Productdetails/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-sm md:text-base font-bold pr-2"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex py-2"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"bg-gray-200 p-1 mr-2 rounded-full text-xs font-medium text-gray-900"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; $&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;k&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex justify-between item-center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex items-center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="na"&gt;xmlns&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"http://www.w3.org/2000/svg"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"h-3 md:h-5 md:w-5 text-yellow-500"&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 20 20"&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-gray-600 font-bold text-xs md:text-sm ml-1"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;rating&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-gray-500 font-normal"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

(76 rewiews)

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex flex-col justify-center items-center p-4"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;some&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;prod&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;prod&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;productCardData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"p-1 flex mb-2 justify-center items-center bg-red-600 hover:bg-red-700 focus:ring-indigo-500 focus:ring-offset-indigo-200 text-white w-full transition ease-in duration-200 text-center text-base font-semibold shadow-md focus:outline-none focus:ring-2 focus:ring-offset-2 rounded-lg "&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;

&lt;span class="nf"&gt;removeFromCart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;productCardData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;CART-

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;remove_shopping_cart &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"p-1 flex mb-2 justify-center items-center bg-gray-700 hover:bg-indigo-700 focus:ring-indigo-500 focus:ring-offset-indigo-200 text-white w-full transition ease-in duration-200 text-center text-base font-semibold shadow-md focus:outline-none focus:ring-2 focus:ring-offset-2 rounded-lg "&lt;/span&gt;

&lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;addToCart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;productCardData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;CART+

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons "&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;shopping_cart&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;wish&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;wishlist&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;wishlist&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;productCardData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"p-1 flex justify-center items-center bg-red-600 hover:bg-red-700 focus:ring-indigo-500 focus:ring-offset-indigo-200 text-white w-full transition ease-in duration-200 text-center text-base font-semibold shadow-md focus:outline-none focus:ring-2 focus:ring-offset-2 rounded-lg"&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;deleteWishList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;productCardData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;WISHLIST- &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;favorite &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;

&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"p-1 flex justify-center items-center bg-gray-700 hover:bg-indigo-700 focus:ring-indigo-500 focus:ring-offset-indigo-200 text-white w-full transition ease-in duration-200 text-center text-base font-semibold shadow-md focus:outline-none focus:ring-2 focus:ring-offset-2 rounded-lg "&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;addToWishlist&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;productCardData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

WISHLIST+

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;favorite_border &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;ProductCard&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component called &lt;code&gt;ProductCard&lt;/code&gt;, which is likely used to display individual product cards on a website or web application. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;import { React, Link, useNavigate } from "../../Utils/CustomUtils";&lt;/code&gt;: Imports &lt;code&gt;React&lt;/code&gt;, &lt;code&gt;Link&lt;/code&gt;, and &lt;code&gt;useNavigate&lt;/code&gt; from &lt;code&gt;"../../Utils/CustomUtils"&lt;/code&gt;. These are likely custom utility functions or modules used in the project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;import { useWishlistContext, useCartContext, useProductContext } from "../../Context/AllContextIndex";&lt;/code&gt;: Imports custom context hooks &lt;code&gt;useWishlistContext&lt;/code&gt;, &lt;code&gt;useCartContext&lt;/code&gt;, and &lt;code&gt;useProductContext&lt;/code&gt; from &lt;code&gt;"../../Context/AllContextIndex"&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;import { addToCart, removeFromCart } from "../../Services/CartServices";&lt;/code&gt;: Imports functions &lt;code&gt;addToCart&lt;/code&gt; and &lt;code&gt;removeFromCart&lt;/code&gt; from &lt;code&gt;"../../Services/CartServices"&lt;/code&gt;. These functions likely handle adding and removing items from the cart.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;import { addToWishlist, deleteWishList } from "../../Services/WishlistServices";&lt;/code&gt;: Imports functions &lt;code&gt;addToWishlist&lt;/code&gt; and &lt;code&gt;deleteWishList&lt;/code&gt; from &lt;code&gt;"../../Services/WishlistServices"&lt;/code&gt;. These functions likely handle adding items to the wishlist and deleting items from it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;import "./ProductCard.css";&lt;/code&gt;: Imports a CSS file named &lt;code&gt;"ProductCard.css"&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Function Component &lt;code&gt;ProductCard&lt;/code&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;This is the main React function component named &lt;code&gt;ProductCard&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It receives props, specifically &lt;code&gt;productCardData&lt;/code&gt;, which likely contains information about the product to be displayed in the card.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Destructuring Props:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;productCardData&lt;/code&gt; prop is destructured to extract relevant data such as &lt;code&gt;_id&lt;/code&gt;, &lt;code&gt;image&lt;/code&gt;, &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;price&lt;/code&gt;, &lt;code&gt;rating&lt;/code&gt;, and &lt;code&gt;inStock&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Context Usage:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;It uses custom context hooks to access the cart (&lt;code&gt;cart&lt;/code&gt;), wishlist (&lt;code&gt;wish&lt;/code&gt;), and product (&lt;code&gt;dispatch&lt;/code&gt;) contexts.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;State and Navigate:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It uses the &lt;code&gt;useNavigate&lt;/code&gt; hook to obtain a navigation function (&lt;code&gt;navigate&lt;/code&gt;) for programmatic navigation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It retrieves a token from the local storage.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;JSX Rendering:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It returns JSX elements to render the product card.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The card includes product details such as image, title, price, and rating.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It displays whether the product is in stock or out of stock.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It provides buttons for adding/removing the product from the cart and wishlist based on their respective states.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each button triggers a specific action (e.g., adding to cart, removing from wishlist) via the provided service functions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;CSS Styling:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;It applies CSS classes and styles defined in the &lt;code&gt;"ProductCard.css"&lt;/code&gt; file to style the elements of the product card.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Export:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;export default ProductCard;&lt;/code&gt;: This line exports the &lt;code&gt;ProductCard&lt;/code&gt; component as the default export, making it available for import in other files. By exporting it as the default export, you can import and use the &lt;code&gt;ProductCard&lt;/code&gt; component without using curly braces in other files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, this code represents a reusable component (&lt;code&gt;ProductCard&lt;/code&gt;) used to display product information and provide functionality for adding/removing products from the cart and wishlist. It follows best practices by separating concerns, utilizing custom contexts and service functions, and applying CSS for styling.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Inputs at authentication pages as well as in the address manager
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useNavigate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Utils/CustomUtils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Utils/CustomCSSUtils.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useLoginContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/AllContextIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;loginHandler&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Services/AuthServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;LoginInputs&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useLoginContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;navigate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useNavigate&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;submitLoginData&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nf"&gt;loginHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;navigate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/ProductListingPage&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setError&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;isDisabled&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setIsDisabled&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nf"&gt;setError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;setIsDisabled&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nf"&gt;setError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;All fields must be filled.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;setIsDisabled&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;setGuestLoginData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;6prankur@gmail.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;12345678&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`Guest`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;EMAIL&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;PASSWORD&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;NAME&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;section&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-gray-400 bg-gray-900 body-font"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"container px-5 py-24 mx-auto flex flex-wrap items-center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"lg:w-3/5 md:w-1/2 md:pr-16 lg:pr-0 pr-0"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"title-font font-medium text-3xl text-white"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Slow-carb next level shoindxgoitch ethical authentic, poko scenester&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"leading-relaxed mt-4"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Poke slow-carb mixtape knausgaard, typewriter street art gentrify hammock starladder roathse. Craies vegan tousled etsy austin.&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"lg:w-2/6 md:w-1/2 bg-gray-800 bg-opacity-50 rounded-lg p-8 flex flex-col md:ml-auto w-full mt-10 md:mt-0"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-white text-lg font-medium title-font mb-5"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Log In&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;form&lt;/span&gt; &lt;span class="na"&gt;onSubmit&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;submitLoginData&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"relative mb-4"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;label&lt;/span&gt; &lt;span class="na"&gt;for&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"full-name"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"leading-7 text-sm text-gray-400"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Email&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;label&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;

&lt;span class="na"&gt;onChange&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;EMAIL&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-full bg-gray-600 bg-opacity-20 focus:bg-transparent focus:ring-2 focus:ring-red-900 rounded border border-gray-600 focus:border-red-500 text-base outline-none text-gray-100 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"&lt;/span&gt;

&lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Enter your email"&lt;/span&gt;

&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"relative mb-4"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;label&lt;/span&gt; &lt;span class="na"&gt;for&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"leading-7 text-sm text-gray-400"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Password&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;label&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"enter your password"&lt;/span&gt; &lt;span class="na"&gt;onChange&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;PASSWORD&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-full bg-gray-600 bg-opacity-20 focus:bg-transparent focus:ring-2 focus:ring-red-900 rounded border border-gray-600 focus:border-red-500 text-base outline-none text-gray-100 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"&lt;/span&gt;

&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex flex-col"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'submit'&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-white bg-red-500 border-0 py-2 px-8 focus:outline-none hover:bg-red-600 rounded text-lg cursor-pointer"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-white bg-blue-500 border-0 py-2 px-8 focus:outline-none hover:bg-blue-600 rounded text-lg mt-2"&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;setGuestLoginData&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Guest Login&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;form&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-xs mt-3"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Literally you probably haven't heard of them jean shorts.

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/SignupPage"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-xs ml-2 text-blue-500 font-semibold"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"font-medium text-blue-600 dark:text-blue-500 hover:underline"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;SignUp&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;section&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;LoginInputs&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React component named &lt;code&gt;LoginInputs&lt;/code&gt;, which likely represents a form for user login functionality. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;import { React, Link, useNavigate, useEffect, useState } from "../../Utils/CustomUtils";&lt;/code&gt;: Imports &lt;code&gt;React&lt;/code&gt;, &lt;code&gt;Link&lt;/code&gt;, &lt;code&gt;useNavigate&lt;/code&gt;, &lt;code&gt;useEffect&lt;/code&gt;, and &lt;code&gt;useState&lt;/code&gt; from &lt;code&gt;"../../Utils/CustomUtils"&lt;/code&gt;. These are likely custom utility functions or modules used in the project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;import "../../Utils/CustomCSSUtils.css";&lt;/code&gt;: Imports a CSS file named &lt;code&gt;"CustomCSSUtils.css"&lt;/code&gt;, presumably for styling the login form.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;import { useLoginContext } from "../../Context/AllContextIndex";&lt;/code&gt;: Imports a custom context hook &lt;code&gt;useLoginContext&lt;/code&gt; from &lt;code&gt;"../../Context/AllContextIndex"&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;import { loginHandler } from "../../Services/AuthServices";&lt;/code&gt;: Imports a function &lt;code&gt;loginHandler&lt;/code&gt; from &lt;code&gt;"../../Services/AuthServices"&lt;/code&gt;, which likely handles the authentication process.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Function Component &lt;code&gt;LoginInputs&lt;/code&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;This is the main React function component named &lt;code&gt;LoginInputs&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It doesn't receive any props directly.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Context Usage:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;It uses the custom context hook &lt;code&gt;useLoginContext&lt;/code&gt; to access login-related state variables such as &lt;code&gt;email&lt;/code&gt;, &lt;code&gt;password&lt;/code&gt;, and &lt;code&gt;dispatch&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;State Management:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It initializes local state variables &lt;code&gt;error&lt;/code&gt; and &lt;code&gt;isDisabled&lt;/code&gt; using the &lt;code&gt;useState&lt;/code&gt; hook.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;These states are used to manage error messages and to disable/enable the submit button based on form validation.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Event Handling:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It defines event handlers for submitting login data and setting guest login data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;submitLoginData()&lt;/code&gt; is called when the login form is submitted. It calls the &lt;code&gt;loginHandler&lt;/code&gt; function and navigates to the product listing page upon successful login.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;setGuestLoginData()&lt;/code&gt; is called when the "Guest Login" button is clicked. It sets predefined guest login data in the login form.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Effect Hook:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It uses the &lt;code&gt;useEffect&lt;/code&gt; hook to perform form validation whenever the &lt;code&gt;email&lt;/code&gt; or &lt;code&gt;password&lt;/code&gt; state variables change.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If both fields are filled, it clears any existing errors and enables the submit button. Otherwise, it sets an error message and disables the submit button.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;JSX Rendering:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It returns JSX elements to render the login form.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The form includes input fields for email and password, along with a submit button and a "Guest Login" button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It also includes a link to the signup page.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;CSS Styling:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;It applies CSS classes and styles defined in the &lt;code&gt;"CustomCSSUtils.css"&lt;/code&gt; file to style the elements of the login form.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Export:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;export default LoginInputs;&lt;/code&gt;: This line exports the &lt;code&gt;LoginInputs&lt;/code&gt; component as the default export, making it available for import in other files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, this code represents a reusable component (&lt;code&gt;LoginInputs&lt;/code&gt;) used to display a login form, handle user input, perform form validation, and interact with the authentication service. It follows best practices by separating concerns, utilizing custom contexts and services, and applying CSS for styling.&lt;/p&gt;

&lt;h1&gt;
  
  
  API's :
&lt;/h1&gt;

&lt;p&gt;Now it is time to build pages and integrate the Data APIs before we start building the pages it is the perfect time to understand the APIs &amp;amp; their integration part and how we are using them in our project.&lt;/p&gt;

&lt;p&gt;What is an API:&lt;/p&gt;

&lt;p&gt;API stands for Application programming interface now let's break all these one by one&lt;/p&gt;

&lt;p&gt;Application - In Information Technology an application is an online/offline tool made to serve a specific purpose to solve problems which includes business logic and is responsible for recording and growing the records online these records are recorded in the database through the frontend and the mechanism which helps to do so is called backend.&lt;/p&gt;

&lt;p&gt;Programming - It is the technological process of telling a computer which tasks to perform to solve problems and while communicating with computers we use some languages these languages are programming languages such as C, C++ and my favorite JavaScript.&lt;/p&gt;

&lt;p&gt;Interface - Consider the interface as a client between your backend data and database without exposing the business logic.&lt;/p&gt;

&lt;p&gt;Now the API theory part is done it is time to show some real magic&lt;/p&gt;

&lt;p&gt;This is a sample code of all the products that I am getting from the API call from Mockbee&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;toast&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../Utils/CustomUtils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getProdcutsData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;LOADINGSPINNER&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;

&lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;GET&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`/api/products`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;

&lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;APIPRODUCTDATA&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;products&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="p"&gt;);&lt;/span&gt;



&lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;LOADINGSPINNER&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;erorr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;toast&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Server is encountering some issues:`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;erorr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Server is encountering some issues:`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;erorr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code is an asynchronous function named &lt;code&gt;getProdcutsData&lt;/code&gt; used to fetch product data from an API endpoint. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Imports: It imports necessary modules &lt;code&gt;React&lt;/code&gt;, &lt;code&gt;toast&lt;/code&gt;, and &lt;code&gt;axios&lt;/code&gt; from the "../Utils/CustomUtils" module.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Function Definition:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;async function getProdcutsData(dispatch)&lt;/code&gt;: It defines an asynchronous function named &lt;code&gt;getProdcutsData&lt;/code&gt; that takes a &lt;code&gt;dispatch&lt;/code&gt; function as a parameter.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Dispatch Action:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;dispatch({ type: "LOADINGSPINNER", payload: true })&lt;/code&gt;: It dispatches an action of type "LOADINGSPINNER" with the payload &lt;code&gt;true&lt;/code&gt; to indicate that the loading spinner should be shown.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;API Request:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;await axios({ method: "GET", url: "/api/products" })&lt;/code&gt;: It makes a GET request to the "/api/products" endpoint using Axios and waits for the response.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Handling Response:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.then((response) =&amp;gt; dispatch({ type: "APIPRODUCTDATA", payload: response.data.products }))&lt;/code&gt;: Once the response is received, it extracts the &lt;code&gt;products&lt;/code&gt; data from the response and dispatches an action of type "APIPRODUCTDATA" with the payload containing the products data.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Dispatch Action (Loading Complete):&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;dispatch({ type: "LOADINGSPINNER", payload: false })&lt;/code&gt;: After receiving the product data or encountering an error, it dispatches an action to stop the loading spinner by setting the payload to &lt;code&gt;false&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Error Handling:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;catch (erorr)&lt;/code&gt;: If any error occurs during the API request, it catches the error.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;toast.error(&lt;/code&gt;Server is encountering some issues:&lt;code&gt;, erorr)&lt;/code&gt;: It shows an error toast notification indicating that the server encountered some issues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;console.log(&lt;/code&gt;Server is encountering some issues:&lt;code&gt;, erorr)&lt;/code&gt;: It logs the error to the console for debugging purposes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, this code fetches product data from an API endpoint, dispatches actions to manage loading state, and handles errors appropriately using toast notifications and console logging.&lt;/p&gt;

&lt;p&gt;All the APIs are integrated in a similar way as Frontend developer its the very crucial and most important part of your job to be very well versed with API integration.&lt;/p&gt;

&lt;p&gt;Before the integration you will have to check and call it once the API is called you will get the response in your console first and after that you will have to tweak the response to display it on Screen, it is not that easy as I said earlier it is very crucial.&lt;/p&gt;

&lt;p&gt;In this project, I have used 20+ API calls and each call is responsible for doing different tasks.&lt;/p&gt;

&lt;h1&gt;
  
  
  Developing Pages
&lt;/h1&gt;

&lt;p&gt;Developing pages is the next task right after developing components here things go hard as this is the area where you will have to do two things in one go first is integrating API data and second is managing components.&lt;/p&gt;

&lt;p&gt;This project has eight pages in the following order :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Homepage&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Product listing page&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Single Product view page&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cart Manager page&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Wishlist page&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Checkout page&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Order success page&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Profile manager page&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Homepage
&lt;/h3&gt;

&lt;p&gt;The Homepage is the main page of any application which describes what the application is all about, my homepage has the following structure here is the code&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Hero&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;FeaturedBrands&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Spinner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Components/AllComponentIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useProductDataContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/ProductListingPageContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Homepage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useProductDataContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Spinner&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"mt-12"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Hero&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;FeaturedBrands&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Homepage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React functional component named &lt;code&gt;Homepage&lt;/code&gt;. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;React&lt;/code&gt;: Importing the React library to define React components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Footer&lt;/code&gt;, &lt;code&gt;Header&lt;/code&gt;, &lt;code&gt;Hero&lt;/code&gt;, &lt;code&gt;FeaturedBrands&lt;/code&gt;, &lt;code&gt;Spinner&lt;/code&gt;: Importing various components from "../../Components/AllComponentIndex" to be used in the &lt;code&gt;Homepage&lt;/code&gt; component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;useProductDataContext&lt;/code&gt;: Importing the &lt;code&gt;useProductDataContext&lt;/code&gt; hook from "../../Context/ProductListingPageContext" to access data related to the product listing page.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Function Definition:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;function Homepage() { ... }&lt;/code&gt;: Defines a functional component named &lt;code&gt;Homepage&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Component Logic:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;const { isLoading } = useProductDataContext();&lt;/code&gt;: Destructures the &lt;code&gt;isLoading&lt;/code&gt; state from the &lt;code&gt;useProductDataContext&lt;/code&gt; hook. This state indicates whether the data is loading or not.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Component JSX:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;: Opens a container div for the component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;Header /&amp;gt;&lt;/code&gt;: Renders the &lt;code&gt;Header&lt;/code&gt; component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;{isLoading ? (&amp;lt;Spinner /&amp;gt;) : ( &amp;lt;div className="mt-12"&amp;gt; &amp;lt;Hero /&amp;gt; &amp;lt;FeaturedBrands /&amp;gt; &amp;lt;/div&amp;gt; )}&lt;/code&gt;:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Checks if &lt;code&gt;isLoading&lt;/code&gt; is true.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If &lt;code&gt;isLoading&lt;/code&gt; is true, render the &lt;code&gt;Spinner&lt;/code&gt; component to indicate that data is loading.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If &lt;code&gt;isLoading&lt;/code&gt; is false, renders the &lt;code&gt;Hero&lt;/code&gt; and &lt;code&gt;FeaturedBrands&lt;/code&gt; components wrapped in a div with &lt;code&gt;className="mt-12"&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;Footer /&amp;gt;&lt;/code&gt;: Renders the &lt;code&gt;Footer&lt;/code&gt; component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;: Closes the container div for the component.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Export:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;export default Homepage;&lt;/code&gt;: Exports the &lt;code&gt;Homepage&lt;/code&gt; component as the default export.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, the &lt;code&gt;Homepage&lt;/code&gt; component renders a header, a spinner while the data is loading, and a hero section along with featured brands when the data has finished loading. It utilizes context to manage the loading state and components from the specified index file.&lt;/p&gt;

&lt;p&gt;The final output look is here :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7t1wwxrps6jct8cdtk0t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7t1wwxrps6jct8cdtk0t.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Product listing page
&lt;/h3&gt;

&lt;p&gt;The Product listing page is responsible for listing all the products in grid view along with the sidebar containing different types of filters to change and find out the product with respect to their stock, price &amp;amp; order. Here is the code&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;toast&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useNavigate&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Utils/CustomUtils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;useCatagoriesFilterContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;useProductDataContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/AllContextIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Spinner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;ProductCard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Sidebar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Components/AllComponentIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./ProductlistingPage.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ProductlistingPage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useProductDataContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;searchbarData&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useCatagoriesFilterContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"bg-gray-700 h-screen"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex justify-start items-start"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Sidebar&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex flex-wrap ml-64 mt-24 mb-8 items-center justify-center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Spinner&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="nx"&gt;searchbarData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;productCardData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ProductCard&lt;/span&gt;

&lt;span class="na"&gt;productCardData&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;productCardData&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;productCardData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;ProductlistingPage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React functional component named &lt;code&gt;ProductlistingPage&lt;/code&gt;. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;React&lt;/code&gt;, &lt;code&gt;toast&lt;/code&gt;, &lt;code&gt;useNavigate&lt;/code&gt;: Importing React library, &lt;code&gt;toast&lt;/code&gt;, and &lt;code&gt;useNavigate&lt;/code&gt; hook from "../../Utils/CustomUtils".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;useCatagoriesFilterContext&lt;/code&gt;, &lt;code&gt;useProductDataContext&lt;/code&gt;: Importing context hooks from "../../Context/AllContextIndex".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Footer&lt;/code&gt;, &lt;code&gt;Header&lt;/code&gt;, &lt;code&gt;Spinner&lt;/code&gt;, &lt;code&gt;ProductCard&lt;/code&gt;, &lt;code&gt;Sidebar&lt;/code&gt;: Importing various components from "../../Components/AllComponentIndex" to be used in the &lt;code&gt;ProductlistingPage&lt;/code&gt; component.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Function Definition:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;function ProductlistingPage() { ... }&lt;/code&gt;: Defines a functional component named &lt;code&gt;ProductlistingPage&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Component Logic:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;const { isLoading } = useProductDataContext();&lt;/code&gt;: Destructures the &lt;code&gt;isLoading&lt;/code&gt; state from the &lt;code&gt;useProductDataContext&lt;/code&gt; hook. This state indicates whether the data is loading or not.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;const { searchbarData } = useCatagoriesFilterContext();&lt;/code&gt;: Destructures the &lt;code&gt;searchbarData&lt;/code&gt; from the &lt;code&gt;useCatagoriesFilterContext&lt;/code&gt; hook. This data represents the filtered products based on categories.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Component JSX:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;div className="bg-gray-700 h-screen"&amp;gt;&lt;/code&gt;: Opens a container div with a grey background that covers the entire height of the screen.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;Header /&amp;gt;&lt;/code&gt;: Renders the &lt;code&gt;Header&lt;/code&gt; component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;div className="flex justify-start items-start"&amp;gt;&lt;/code&gt;: Opens a div with flex layout to arrange items horizontally, starting from the left.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;Sidebar /&amp;gt;&lt;/code&gt;: Renders the &lt;code&gt;Sidebar&lt;/code&gt; component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;div className="flex flex-wrap ml-64 mt-24 mb-8 items-center justify-center"&amp;gt;&lt;/code&gt;: Opens a div with flex layout, wrapping its contents, and applying margin and alignment styles.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;{isLoading ? (&amp;lt;Spinner /&amp;gt;) : ( searchbarData.map((productCardData) =&amp;gt; { ... }))}&lt;/code&gt;: Renders the &lt;code&gt;Spinner&lt;/code&gt; component if &lt;code&gt;isLoading&lt;/code&gt; is true. Otherwise, it maps over the &lt;code&gt;searchbarData&lt;/code&gt; array and renders a &lt;code&gt;ProductCard&lt;/code&gt; component for each item.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;: Closes the div with flex layout.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;: Closes the outer container div.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Export:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;export default ProductlistingPage;&lt;/code&gt;: Exports the &lt;code&gt;ProductlistingPage&lt;/code&gt; component as the default export.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, the &lt;code&gt;ProductlistingPage&lt;/code&gt; component renders a header, a sidebar, and a list of product cards. The product cards are dynamically rendered based on the data fetched from the context, and a spinner is shown while the data is loading.&lt;/p&gt;

&lt;p&gt;The Final Output is here :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjhili8c2yitoefhxxgkz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjhili8c2yitoefhxxgkz.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Single Product View Page
&lt;/h3&gt;

&lt;p&gt;The Single Product view is the best example of dynamic routing which is made possible due to React Router it allows to enable dynamic routing resulting in creating a single page for each product along with its details.&lt;/p&gt;

&lt;p&gt;Here is the sample code :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;SingleProductCard&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Components/AllComponentIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;SingleProductPage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SingleProductCard&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;SingleProductPage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React functional component named &lt;code&gt;SingleProductPage&lt;/code&gt;. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;React&lt;/code&gt;: Importing React library to define and use React components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Footer&lt;/code&gt;, &lt;code&gt;Header&lt;/code&gt;, &lt;code&gt;SingleProductCard&lt;/code&gt;: Importing components from "../../Components/AllComponentIndex" to be used in the &lt;code&gt;SingleProductPage&lt;/code&gt; component.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Function Definition:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;function SingleProductPage() { ... }&lt;/code&gt;: Defines a functional component named &lt;code&gt;SingleProductPage&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Component JSX:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;: Opens a container div.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;Header /&amp;gt;&lt;/code&gt;: Renders the &lt;code&gt;Header&lt;/code&gt; component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;SingleProductCard /&amp;gt;&lt;/code&gt;: Renders the &lt;code&gt;SingleProductCard&lt;/code&gt; component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;Footer /&amp;gt;&lt;/code&gt;: Renders the &lt;code&gt;Footer&lt;/code&gt; component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;: Closes the container div.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Export:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;export default SingleProductPage;&lt;/code&gt;: Exports the &lt;code&gt;SingleProductPage&lt;/code&gt; component as the default export.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, the &lt;code&gt;SingleProductPage&lt;/code&gt; component renders a header, a single product card, and a footer. It serves as a page for displaying details of a single product.&lt;/p&gt;

&lt;p&gt;Let's dig deeper into what's inside the &lt;code&gt;&amp;lt;SingleProductCard /&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;toast&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;useParams&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Utils/CustomUtils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;useWishlistContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;useCartContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;useProductContext&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/AllContextIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Rating&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Components/AllComponentIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./SingleProductCard.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;addToCart&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;removeFromCart&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Services/CartServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;addToWishlist&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;deleteWishList&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Services/WishlistServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;SingleProductCard&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;wish&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useWishlistContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useProductContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;cart&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useCartContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;singleProduct&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setSingleProduct&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;([]);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;inStock&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;manufacturedBy&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;rating&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;categoryName&lt;/span&gt;&lt;span class="p"&gt;,}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;singleProduct&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;productId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useParams&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

 &lt;span class="c1"&gt;// function to get the product data from the product id&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getProductById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;productId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`/api/products/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;productId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nf"&gt;setSingleProduct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; err&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;toast&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;success&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; Fetching single card data.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;getProductById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;productId&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;productId&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;


&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;section&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-gray-600 body-font overflow-hidden"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"container px-5 py-24 mx-auto"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"lg:w-4/5 mx-auto flex flex-wrap"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"ecommerce"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"lg:w-1/2 w-full lg:h-auto h-64 object-cover object-center rounded"&lt;/span&gt;

&lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;image&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"lg:w-1/2 w-full lg:pl-10 lg:py-6 mt-6 lg:mt-0"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-gray-900 text-3xl title-font font-medium mb-1"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex mb-4"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex items-center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke-linecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-linejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-4 h-4 text-indigo-500"&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;

&lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke-linecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-linejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-4 h-4 text-indigo-500"&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke-linecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-linejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-4 h-4 text-indigo-500"&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke-linecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-linejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-4 h-4 text-indigo-500"&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt; &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke-linecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-linejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-4 h-4 text-indigo-500"&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-gray-600 ml-3"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;4 Reviews&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"leading-relaxed"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;description&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex mt-6 items-center pb-5 border-b-2 border-gray-100 mb-5"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex ml-6 items-center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"relative"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"absolute right-0 top-0 h-full w-10 text-center text-gray-600 pointer-events-none flex items-center justify-center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt; &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke-linecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-linejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-4 h-4"&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M6 9l6 6 6-6"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"title-font font-medium text-2xl text-gray-900"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

$&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;some&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;prod&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;prod&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex ml-auto text-white bg-red-500 border-0 py-2 px-6 focus:outline-none hover:bg-indigo-600 rounded"&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;removeFromCart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

REMOVE FROM CART

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons buttonmi"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

remove_shopping_cart&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;

&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex ml-auto text-white bg-indigo-500 border-0 py-2 px-6 focus:outline-none hover:bg-indigo-600 rounded"&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;addToCart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;singleProduct&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

ADD TO CART &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons buttonmi"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; shopping_cart&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;wish&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;some&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;wishlist&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;wishlist&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;

&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"rounded-full w-10 h-10 bg-red-500 p-0 border-0 inline-flex items-center justify-center text-white ml-4"&lt;/span&gt;

&lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;deleteWishList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons buttonmi"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

favorite_border&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;

&lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;addToWishlist&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;singleProduct&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"rounded-full w-10 h-10 bg-gray-200 p-0 border-0 inline-flex items-center justify-center text-gray-500 ml-4"&lt;/span&gt;

&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke-linecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-linejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-5 h-5"&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;section&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;SingleProductCard&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Here is the complete explanation of the code&lt;/p&gt;

&lt;p&gt;This code defines a React functional component named &lt;code&gt;SingleProductCard&lt;/code&gt;. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;React&lt;/code&gt;: Importing React library to define and use React components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;useEffect&lt;/code&gt;, &lt;code&gt;useState&lt;/code&gt;, &lt;code&gt;axios&lt;/code&gt;, &lt;code&gt;toast&lt;/code&gt;, &lt;code&gt;useParams&lt;/code&gt;: Importing hooks and libraries from "../../Utils/CustomUtils" for managing component state, making HTTP requests, displaying notifications, and accessing route parameters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;useWishlistContext&lt;/code&gt;, &lt;code&gt;useCartContext&lt;/code&gt;, &lt;code&gt;useProductContext&lt;/code&gt;: Importing custom hooks from "../../Context/AllContextIndex" for accessing context data related to wishlist, cart, and product.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Rating&lt;/code&gt;: Importing the &lt;code&gt;Rating&lt;/code&gt; component from "../../Components/AllComponentIndex".&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Function Definition:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;function SingleProductCard() { ... }&lt;/code&gt;: Defines a functional component named &lt;code&gt;SingleProductCard&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Component State:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;const [singleProduct, setSingleProduct] = useState([]);&lt;/code&gt;: Declares state variable &lt;code&gt;singleProduct&lt;/code&gt; and its setter function using the &lt;code&gt;useState&lt;/code&gt; hook. It initializes &lt;code&gt;singleProduct&lt;/code&gt; with an empty array.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Route Parameters:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;const productId = useParams();&lt;/code&gt;: Retrieves route parameters using the &lt;code&gt;useParams&lt;/code&gt; hook.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Function to Fetch Product Data:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;getProductById(productId)&lt;/code&gt;: Defines a function &lt;code&gt;getProductById&lt;/code&gt; to fetch product data based on the provided product ID using Axios.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Effect Hook:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;useEffect(() =&amp;gt; { ... }, [productId]);&lt;/code&gt;: Executes the effect function whenever the &lt;code&gt;productId&lt;/code&gt; changes. It fetches product data based on the &lt;code&gt;productId&lt;/code&gt; using the &lt;code&gt;getProductById&lt;/code&gt; function.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Component JSX:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Renders the product details including title, image, rating, price, description, and buttons for adding/removing from cart and wishlist.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Export:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;export default SingleProductCard;&lt;/code&gt;: Exports the &lt;code&gt;SingleProductCard&lt;/code&gt; component as the default export.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, the &lt;code&gt;SingleProductCard&lt;/code&gt; component fetches and displays details of a single product based on the product ID obtained from the route parameters. It also provides options for adding/removing the product from the cart and wishlist.&lt;/p&gt;

&lt;p&gt;The screen output is here  : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1lqru1duvmgll9exv39v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1lqru1duvmgll9exv39v.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Cart Manager page
&lt;/h3&gt;

&lt;p&gt;The cart manager in any e-commerce app is important as it helps users to completely manage the quantity and place the order for the product.&lt;/p&gt;

&lt;p&gt;In this application, you can increase and decrease the quantity,remove the product from the cart, add the product to the wishlist and place the order.&lt;/p&gt;

&lt;p&gt;Here is the sample code&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Utils/CustomUtils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;TotalPrice&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Spinner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Components/AllComponentIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;useCartContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;useProductDataContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;useWishlistContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/AllContextIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;removeFromCart&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;updateQty&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Services/CartServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;addToWishlist&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;deleteWishList&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Services/WishlistServices&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;CartPage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;wish&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useWishlistContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useProductDataContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;totalprice&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useCartContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;

&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;TOTALPRICE&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;acc&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nc"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;qty&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nc"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;

&lt;span class="mi"&gt;0&lt;/span&gt;

&lt;span class="p"&gt;),&lt;/span&gt;

&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="na"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;section&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;" bg-gray-100 py-12 sm:py-16 lg:py-20 mb-20"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"mx-auto px-4 sm:px-6 lg:px-8"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex items-center justify-center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"mx-auto mt-20 mb-8 max-w-2xl md:mt-12"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"bg-white shadow"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"px-4 py-6 sm:px-8 sm:py-10"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flow-root"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;ul&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"-my-8"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cartdata&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex flex-col space-y-3 py-6 text-left sm:flex-row sm:space-x-5 sm:space-y-0"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"shrink-0"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"h-24 w-24 max-w-full rounded-lg object-cover"&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;cartdata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"relative flex flex-1 flex-col justify-between"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"sm:col-gap-5 sm:grid sm:grid-cols-2"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"pr-8 sm:pr-5"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-base font-semibold text-gray-900"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;cartdata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"relative inline-block px-3 py-1 font-semibold text-green-900 leading-tight"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;wish&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;wishlist&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;wishlist&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;cartdata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;data-tooltip-target&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"tooltip-default"&lt;/span&gt;

&lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;

&lt;span class="nf"&gt;deleteWishList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cartdata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

heart_broken

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;

&lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;addToWishlist&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cartdata&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

favorite_border&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"relative inline-block px-3 py-1 font-semibold text-green-900 leading-tight"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;

&lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;

&lt;span class="nf"&gt;removeFromCart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cartdata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"material-icons"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;delete&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"mt-4 flex items-end justify-between sm:mt-0 sm:items-start sm:justify-end"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"shrink-0 w-20 text-base font-semibold text-gray-900 sm:order-2 sm:ml-8 sm:text-right"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;cartdata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"sm:order-1"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"mx-auto flex h-8 items-stretch text-gray-600"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex items-center justify-center rounded-l-md bg-gray-200 px-4 transition hover:bg-black hover:text-white"&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;

&lt;span class="nf"&gt;updateQty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;decrement&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cartdata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;-&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex w-full items-center justify-center bg-gray-100 px-4 text-xs uppercase transition"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;cartdata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;qty&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex items-center justify-center rounded-r-md bg-gray-200 px-4 transition hover:bg-black hover:text-white"&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;

&lt;span class="nf"&gt;updateQty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;increment&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cartdata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;+&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;)&lt;/span&gt;

&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;ul&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"mt-6 border-t border-b py-2"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex items-center justify-between"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-sm text-gray-400"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Subtotal&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-lg font-semibold text-gray-900"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;totalprice&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"mt-6 flex items-center justify-between"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-sm font-medium text-gray-900"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Total&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-2xl font-semibold text-gray-900"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-xs font-normal text-gray-400"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;₹&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;totalprice&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"mt-6 text-center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'/Checkoutpage'&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"group inline-flex w-full items-center justify-center rounded-md bg-gray-900 px-6 py-4 text-lg font-semibold text-white transition-all duration-200 ease-in-out focus:shadow hover:bg-gray-800"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

Checkout

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="na"&gt;xmlns&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"http://www.w3.org/2000/svg"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"group-hover:ml-8 ml-4 h-6 w-6 transition-all"&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt; &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;stroke-linecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;stroke-linejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M13 7l5 5m0 0l-5 5m5-5H6"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;section&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;CartPage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React functional component named &lt;code&gt;CartPage&lt;/code&gt;, which represents the shopping cart page of an e-commerce application. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Link&lt;/code&gt;: Importing &lt;code&gt;Link&lt;/code&gt; from "../../Utils/CustomUtils" for routing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;useEffect&lt;/code&gt;: Importing the &lt;code&gt;useEffect&lt;/code&gt; hook from React for side effects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Header&lt;/code&gt;, &lt;code&gt;Footer&lt;/code&gt;, &lt;code&gt;TotalPrice&lt;/code&gt;, &lt;code&gt;Spinner&lt;/code&gt;: Importing components from "../../Components/AllComponentIndex".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;useCartContext&lt;/code&gt;, &lt;code&gt;useProductDataContext&lt;/code&gt;, &lt;code&gt;useWishlistContext&lt;/code&gt;: Importing custom hooks from "../../Context/AllContextIndex" for accessing context data related to the cart, product data, and wishlist.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;removeFromCart&lt;/code&gt;, &lt;code&gt;updateQty&lt;/code&gt;, &lt;code&gt;addToWishlist&lt;/code&gt;, &lt;code&gt;deleteWishList&lt;/code&gt;: Importing functions from "../../Services/CartServices" and "../../Services/WishlistServices" for managing cart and wishlist actions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Function Definition:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;function CartPage() { ... }&lt;/code&gt;: Defines a functional component named &lt;code&gt;CartPage&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Context and State Variables:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Retrieves context and state variables using custom context hooks: &lt;code&gt;useWishlistContext&lt;/code&gt;, &lt;code&gt;useProductDataContext&lt;/code&gt;, &lt;code&gt;useCartContext&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Destructures variables like &lt;code&gt;dispatch&lt;/code&gt;, &lt;code&gt;wish&lt;/code&gt;, &lt;code&gt;isLoading&lt;/code&gt;, &lt;code&gt;cart&lt;/code&gt;, &lt;code&gt;state&lt;/code&gt;, &lt;code&gt;totalprice&lt;/code&gt; from the respective contexts.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Effect Hook:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Uses the &lt;code&gt;useEffect&lt;/code&gt; hook to calculate the total price of items in the cart whenever the &lt;code&gt;cart&lt;/code&gt; state changes. It dispatches an action to update the total price.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Component JSX:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Renders the header, which includes a cart icon indicating the number of items in the cart.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Displays a section for the shopping cart items, including product image, title, price, quantity, and buttons for removing items from the cart or wishlist.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Calculates and displays the subtotal and total price of the items in the cart.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Provides a "Checkout" button linked to the Checkout page using the &lt;code&gt;Link&lt;/code&gt; component.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Export:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;export default CartPage;&lt;/code&gt;: Exports the &lt;code&gt;CartPage&lt;/code&gt; component as the default export.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, the &lt;code&gt;CartPage&lt;/code&gt; component renders the contents of the shopping cart, and allows users to update quantities, remove items, and proceed to checkout. It also interacts with the wishlist, allowing users to add or remove items.&lt;/p&gt;

&lt;p&gt;The cart manager screen output is here : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/image%2Ftutorial%2F1711683292669.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/image%2Ftutorial%2F1711683292669.png" alt="1711683292669"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Wishlist page
&lt;/h3&gt;

&lt;p&gt;The wishlist page allows users to add products for future reffernce hereis the sample code .&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Utils/CustomUtils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;useProductDataContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;useWishlistContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/AllContextIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;ProductCard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Spinner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Components/AllComponentIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./Wishlist.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;WishlistPage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;wish&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useWishlistContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useProductDataContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;



&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;



&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Spinner&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;wish&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"cart-mesg"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; there are no items in Wishlist &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"wishlist-cards"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;wish&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;wishlistpagedata&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ProductCard&lt;/span&gt;

&lt;span class="na"&gt;productCardData&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;wishlistpagedata&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;wishlistpagedata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;



&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;



&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;WishlistPage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React functional component named &lt;code&gt;WishlistPage&lt;/code&gt;, which represents the wishlist page of an e-commerce application. Here's a breakdown of the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;React&lt;/code&gt;: Importing the &lt;code&gt;React&lt;/code&gt; object from "../../Utils/CustomUtils".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;useProductDataContext&lt;/code&gt;, &lt;code&gt;useWishlistContext&lt;/code&gt;: Importing custom hooks from "../../Context/AllContextIndex" for accessing context data related to product data and wishlist.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Footer&lt;/code&gt;, &lt;code&gt;Header&lt;/code&gt;, &lt;code&gt;ProductCard&lt;/code&gt;, &lt;code&gt;Spinner&lt;/code&gt;: Importing components from "../../Components/AllComponentIndex".&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Function Definition:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;function WishlistPage() { ... }&lt;/code&gt;: Defines a functional component named &lt;code&gt;WishlistPage&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Context and State Variables:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Retrieves context variables using custom context hooks: &lt;code&gt;useWishlistContext&lt;/code&gt; and &lt;code&gt;useProductDataContext&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Destructures variables like &lt;code&gt;wish&lt;/code&gt; and &lt;code&gt;isLoading&lt;/code&gt; from the respective contexts.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Component JSX:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Renders the header component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Checks if data is loading. If loading, it displays a spinner component (&lt;code&gt;Spinner&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the wishlist is empty (&lt;code&gt;wish.length === 0&lt;/code&gt;), it displays a message indicating that there are no items in the wishlist.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the wishlist is not empty, it maps through each item in the wishlist (&lt;code&gt;wish&lt;/code&gt;) and renders a &lt;code&gt;ProductCard&lt;/code&gt; component for each item.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;CSS Styling:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Applies CSS styles defined in the "Wishlist.css" file.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Export:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;export default WishlistPage;&lt;/code&gt;: Exports the &lt;code&gt;WishlistPage&lt;/code&gt; component as the default export.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, the &lt;code&gt;WishlistPage&lt;/code&gt; component renders the contents of the wishlist. If the wishlist is empty, it displays a message. Otherwise, it renders each item in the wishlist using the &lt;code&gt;ProductCard&lt;/code&gt; component.&lt;/p&gt;

&lt;p&gt;The Wishlist page output is here :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxsxx83s8fowlvh8xl4u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxsxx83s8fowlvh8xl4u.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Checkout page
&lt;/h3&gt;

&lt;p&gt;The checkout page is the page where we place actual details and give the consent to place the order in this project the page allows users to see what they are about to purchase under how much quantity and what the total cost to be paid, add an address to enable payments(testing mode) and then only the order will be placed here is the code.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Checkout&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Spinner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Components/AllComponentIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useProductDataContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/ProductListingPageContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./Checkoutpage.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Checkoutpage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useProductDataContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Spinner&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Checkout&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Checkoutpage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React functional component named &lt;code&gt;Checkoutpage&lt;/code&gt;, which represents the checkout page of an e-commerce application. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;React&lt;/code&gt;: Importing the &lt;code&gt;React&lt;/code&gt; object from "react".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Footer&lt;/code&gt;, &lt;code&gt;Header&lt;/code&gt;, &lt;code&gt;Checkout&lt;/code&gt;, &lt;code&gt;Spinner&lt;/code&gt;: Importing components from "../../Components/AllComponentIndex".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;useProductDataContext&lt;/code&gt;: Importing a custom hook from "../../Context/ProductListingPageContext" to access context data related to product listing.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Function Definition:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;function Checkoutpage() { ... }&lt;/code&gt;: Defines a functional component named &lt;code&gt;Checkoutpage&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Context and State Variables:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Retrieves context variables using the custom hook &lt;code&gt;useProductDataContext&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Destructures the &lt;code&gt;isLoading&lt;/code&gt; variable from the context.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Component JSX:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Renders the header component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Checks if data is loading. If loading, it displays a spinner component (&lt;code&gt;Spinner&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If data is not loading, it renders the checkout component (&lt;code&gt;Checkout&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Renders the footer component.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;CSS Styling:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Applies CSS styles defined in the "Checkoutpage.css" file.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Export:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;export default Checkoutpage;&lt;/code&gt;: Exports the &lt;code&gt;Checkoutpage&lt;/code&gt; component as the default export.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, the &lt;code&gt;Checkoutpage&lt;/code&gt; component renders the checkout page of the e-commerce application. It first displays the header, then either a spinner or the checkout component based on whether data is loading, and finally the footer.&lt;/p&gt;

&lt;p&gt;The Checkout page output is here :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpctpk7pl7qwrypto157t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpctpk7pl7qwrypto157t.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Order success page
&lt;/h3&gt;

&lt;p&gt;This page shows the order has been placed here is the code.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;OrderConfirm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Spinner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Components/AllComponentIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useProductDataContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/ProductListingPageContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;OrderSuccessPage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useProductDataContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Spinner&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;OrderConfirm&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;OrderSuccessPage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React functional component named &lt;code&gt;OrderSuccessPage&lt;/code&gt;, which represents a page confirming the successful placement of an order. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;React&lt;/code&gt;: Importing the &lt;code&gt;React&lt;/code&gt; object from "react".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Footer&lt;/code&gt;, &lt;code&gt;Header&lt;/code&gt;, &lt;code&gt;OrderConfirm&lt;/code&gt;, &lt;code&gt;Spinner&lt;/code&gt;: Importing components from "../../Components/AllComponentIndex".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;useProductDataContext&lt;/code&gt;: Importing a custom hook from "../../Context/ProductListingPageContext" to access context data related to the product listing.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Function Definition:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;function OrderSuccessPage() { ... }&lt;/code&gt;: Defines a functional component named &lt;code&gt;OrderSuccessPage&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Context and State Variables:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Retrieves context variables using the custom hook &lt;code&gt;useProductDataContext&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Destructures the &lt;code&gt;isLoading&lt;/code&gt; variable from the context.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Component JSX:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Renders the header component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Checks if data is loading. If loading, it displays a spinner component (&lt;code&gt;Spinner&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If data is not loading, it renders the order confirmation component (&lt;code&gt;OrderConfirm&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Renders the footer component.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Export:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;export default OrderSuccessPage;&lt;/code&gt;: Exports the &lt;code&gt;OrderSuccessPage&lt;/code&gt; component as the default export.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, the &lt;code&gt;OrderSuccessPage&lt;/code&gt; component renders a page confirming the successful placement of an order. It displays the header, followed by either a spinner or the order confirmation component based on whether data is loading, and finally the footer.&lt;/p&gt;

&lt;p&gt;The Order Sucess page output is here :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fznsr4qy0dq32i6triowg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fznsr4qy0dq32i6triowg.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Profile manager page
&lt;/h3&gt;

&lt;p&gt;The profile manager page shows the profile data, purchased product details and already added address here is the code&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nx"&gt;Footer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;AccountTabs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="nx"&gt;Spinner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Components/AllComponentIndex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useProductDataContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../Context/ProductListingPageContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./AccountPage.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;AccountPage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useProductDataContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Spinner&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;AccountTabs&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footer&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;AccountPage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This code defines a React functional component named &lt;code&gt;AccountPage&lt;/code&gt;, which represents a page for managing user accounts. Let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imports:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;React&lt;/code&gt;: Importing the &lt;code&gt;React&lt;/code&gt; object from "react".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Footer&lt;/code&gt;, &lt;code&gt;AccountTabs&lt;/code&gt;, &lt;code&gt;Header&lt;/code&gt;, &lt;code&gt;Spinner&lt;/code&gt;: Importing components from "../../Components/AllComponentIndex".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;useProductDataContext&lt;/code&gt;: Importing a custom hook from "../../Context/ProductListingPageContext" to access context data related to the product listing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;./AccountPage.css&lt;/code&gt;: Importing a CSS file for styling this component.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Function Definition:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;function AccountPage() { ... }&lt;/code&gt;: Defines a functional component named &lt;code&gt;AccountPage&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Context and State Variables:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Retrieves context variables using the custom hook &lt;code&gt;useProductDataContext&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Destructures the &lt;code&gt;isLoading&lt;/code&gt; variable from the context.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Component JSX:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Renders the header component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Checks if data is loading. If loading, it displays a spinner component (&lt;code&gt;Spinner&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If data is not loading, it renders the account tabs component (&lt;code&gt;AccountTabs&lt;/code&gt;), which presumably contains different tabs for managing user account information.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Renders the footer component.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Export:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;export default AccountPage;&lt;/code&gt;: Exports the &lt;code&gt;AccountPage&lt;/code&gt; component as the default export.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, the &lt;code&gt;AccountPage&lt;/code&gt; component renders a page for managing user accounts. It displays the header, followed by either a spinner or the account tabs component based on whether data is loading, and finally the footer. The specific functionality of the account tabs is handled by the &lt;code&gt;AccountTabs&lt;/code&gt; component.&lt;/p&gt;

&lt;p&gt;The Profile Manager page output is here :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwl2xxgk8l69yyq5r21nu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwl2xxgk8l69yyq5r21nu.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Authentication Pages:
&lt;/h3&gt;

&lt;p&gt;The authentication pages are the most important part of any application as they allow the users to register on the platform and later log into the system with valid credentials.&lt;/p&gt;

&lt;p&gt;It also helps to track the registered user data by providing a better user experience.&lt;/p&gt;

&lt;p&gt;My application has two authentication pages one is a Signup page and another is a Login page, each page has different input types for user signup they will have to provide their name and email along with all these they also have to make a secure password that can be later used for login.&lt;/p&gt;

&lt;p&gt;The Login page only accepts two inputs one is your registered email which you had used for the signup and the same registered password.&lt;/p&gt;

&lt;p&gt;You can check both of screen output here : &lt;/p&gt;

&lt;h4&gt;
  
  
  Login Page
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F85gan6zam8bjeqapqlly.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F85gan6zam8bjeqapqlly.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Login page also has a Guest Login feature which will take you into the application without registering on the platform.&lt;/p&gt;

&lt;h4&gt;
  
  
  Signup Page
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz4cosf7p4ztitzz1fsyg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz4cosf7p4ztitzz1fsyg.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;I have followed the clean code architecture as it allows me to display the code in a cleaner way making it easy to understand and maintain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I Followed the standard folder structure for maintaining and separating the code into smaller chunks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Complete coding follows the functional programming concept.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I am not a UI/UX guy the intention was to understand the React JS in a better way by building projects so I developed it without focusing much on the UI/UX part.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thanks for Reading it you can see the complete code on &lt;a href="https://github.com/prankurpandeyy/Slate-Store/tree/development/agri-store-react/src" rel="noopener noreferrer"&gt;github&lt;/a&gt;  and can browse the project &lt;a href="https://slate-ecom-app.netlify.app/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have anything to share with me or want me to develop some web app I am always open to opportunities you can connect here on &lt;a href="https://www.linkedin.com/in/prankurpandeyy/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Salesforce AI for Better Data Management: Automating Data Cleansing and Duplication</title>
      <dc:creator>PRANKUR PANDEY</dc:creator>
      <pubDate>Thu, 28 Mar 2024 11:26:39 +0000</pubDate>
      <link>https://dev.to/prankurpandeyy/salesforce-ai-for-better-data-management-automating-data-cleansing-and-duplication-4hj4</link>
      <guid>https://dev.to/prankurpandeyy/salesforce-ai-for-better-data-management-automating-data-cleansing-and-duplication-4hj4</guid>
      <description>&lt;p&gt;Did you know that Salesforce Einstein processes over &lt;a href="https://hutte.io/trails/salesforce-statistics/"&gt;1 trillion transactions&lt;/a&gt;? It leverages AI, machine learning, and data analytics to give you a game-changing advantage. &lt;br&gt;
Salesforce AI is redefining the approach to data management by automating the intricate tasks of data cleansing and duplication. Organizations that adopt this technology witness enhanced data quality and operational efficiency, making informed decisions faster and with greater confidence.&lt;br&gt;
This article explores integrating AI technologies within Professional Automation Systems (PAS) to tackle common data management challenges. Manual processes are tedious and prone to errors, and duplicate records complicate decision-making. Salesforce AI promises streamlined and more accurate data handling.&lt;br&gt;
Challenges in Identifying and Resolving Duplicate Records Manually &lt;/p&gt;

&lt;p&gt;Among the leading stumbling blocks in manually identifying duplicate records is the volume of data. Organizations produce and accumulate huge amounts of data daily, making it difficult to identify duplicates.&lt;/p&gt;

&lt;p&gt;The problem grows in the sense that it is still manual; people do not have the facility to detect duplicates with precision, especially if they are spread across diverse bases or systems.&lt;/p&gt;

&lt;p&gt;Another challenge is inconsistent data entry. Record creation or updating is bound to human errors, such as misspelling words, formatting differences, or missing details. &lt;/p&gt;

&lt;p&gt;All these obstacles prevent reconciling duplicate records. Identifying these deviations is a time-consuming and error-prone manual process. This may lead to the loss of genuine records and the retention of the wrong ones. It is also difficult to resolve manually because it involves protecting data and privacy. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10 Steps to Use AI-Driven Insights for Identifying Duplicate Records in Salesforce&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The following ten steps will help you use Einstein AI to identify duplicate records:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enable and Configure Einstein AI&lt;/strong&gt;: &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Salesforce's AI capabilities are powered by Einstein AI. Developers need to enable Einstein AI in their Salesforce environment. This may involve configuring specific Einstein AI features relevant to data management and duplicate detection, such as Einstein Data Insights. Read &lt;a href="https://help.salesforce.com/s/articleView?id=sf.generative_ai_enable.htm&amp;amp;language=en_US&amp;amp;release=248.12.0&amp;amp;type=5"&gt;here&lt;/a&gt; how to enable it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Set Up Data Models:&lt;/strong&gt; Define and set up your data models in Salesforce. This involves identifying which objects (like contacts, leads, or custom objects) are prone to duplication and understanding the important structure and fields for your business processes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement Data Quality Rules&lt;/strong&gt;: Salesforce's data management tools implement data quality rules. These rules can include criteria for identifying potential duplicates, such as matching email addresses, phone numbers, or custom field values that should be unique.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Leverage Einstein Duplicate Management:&lt;/strong&gt; Salesforce offers Einstein Duplicate Management tools that can be customized to detect and manage duplicates based on your data quality rules. Configure the Duplicate and Matching Rules to use AI-driven insights to identify potential duplicates. Read &lt;a href="https://help.salesforce.com/s/articleView?id=sf.managing_duplicates_overview.htm&amp;amp;language=en_US&amp;amp;release=248.12.0&amp;amp;type=5"&gt;this guide&lt;/a&gt; to help you get started.
Custom AI Models: For more complex scenarios, developers can build custom AI models using Apex or Einstein Platform Services. These models can be trained on your Salesforce data to recognize duplicates based on patterns that may not be evident through standard matching rules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integrate External AI Tools&lt;/strong&gt;: If necessary, Salesforce can be integrated with external AI and machine learning platforms to enhance duplicate detection capabilities. This can be done through Salesforce's APIs, allowing for ingesting insights generated by external AI models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review and Act on Insights:&lt;/strong&gt; Once duplicates are identified, use Salesforce's reporting and dashboard tools to review the AI-generated insights. Develop workflows or use Salesforce's automation tools to manage these duplicates, such as merging records or flagging them for manual review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Continuously Train and Improve:&lt;/strong&gt; AI models benefit from continuous training. Review the performance of your AI-driven duplicate detection processes regularly and adjust your models and rules as necessary to improve accuracy and efficiency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintain Data Hygiene:&lt;/strong&gt; Use AI insights to maintain overall data hygiene beyond identifying duplicates. This can include identifying incomplete records or patterns indicating data quality issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Educate and Empower Users:&lt;/strong&gt; Finally, ensure that end-users and administrators know the importance of data quality and how to handle duplicates. Provide training on using the tools and reports available to manage duplicates effectively.
Automating Data Cleansing with Salesforce AI
Automating data cleansing with Salesforce AI involves a structured approach to ensure your data remains clean, accurate, and useful for your business operations. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here’s how you can implement this using actionable steps:&lt;br&gt;
Setting Up Data Quality Rules&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Define Your Data Standards:&lt;/strong&gt; Start by defining clear standards for your data. This includes formats for phone numbers, email addresses, date formats, and any custom fields specific to your business.
Identify Key Fields for Quality Checks: Determine which fields are critical for your operations and should be prioritized for data cleansing. Common fields include customer contact information, lead details, and account records.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Validation Rules:&lt;/strong&gt; Implement validation rules in Salesforce to ensure data entered into the system meets your predefined standards. This can include rules for mandatory fields, unique fields, and format validations.
Leverage Formula Fields: Use formula fields to check data consistency and accuracy across related records.
Using Pre-built AI Models&lt;/li&gt;
&lt;li&gt;**Explore Available Models: **Salesforce Einstein offers a range of pre-built AI models tailored for common business needs. Explore the models available in Einstein Prediction Builder and Einstein Data Insights.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Activate Einstein Data Insights:&lt;/strong&gt; Use Einstein Data Insights to automatically analyze your data and get suggestions for data quality improvements. This can help identify trends, outliers, and anomalies in your data.
Implement Einstein Prediction Builder: Leverage Einstein Prediction Builder to create predictions based on your data quality criteria. For example, predict which records might have missing or incorrect information.
Creating Custom AI Models for Specific Needs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Define Custom Model Criteria:&lt;/strong&gt; If your data cleansing needs go beyond what's offered by pre-built models, identify the specific criteria for your custom model. This could be related to industry-specific data validation or complex data relationships.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collect and Prepare Data:&lt;/strong&gt; Gather historical data representing clean and problematic records. Clean and segment this data into training and test sets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build and Train Your Model:&lt;/strong&gt; Use tools like Salesforce &lt;a href="https://www.salesforce.com/products/platform/"&gt;Einstein Platform Services&lt;/a&gt; or external AI platforms to build and train your model. Focus on the specific features (fields) most indicative of data quality issues.
Test and Deploy: Test your model with the test data set and adjust it based on performance. Once satisfied, deploy the model into your Salesforce environment.
Vonage's Transformation with Salesforce AI: A Beacon for Efficient Data Management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Vonage, a global leader in cloud communications, embarked on a mission to overcome challenges posed by siloed datasets and manual processes resulting from a series of acquisitions. The company's strategic pivot towards Salesforce Customer 360 underscored its commitment to unifying and automating data management to foster growth and enhance efficiency.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Centralized Communication Hub:&lt;/strong&gt; Using Slack as a digital headquarters, Vonage significantly improved information dissemination among team members, reducing the time to collect and verify data from days to minutes. This automation of communication workflows enabled rapid customer service and enhanced productivity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Seamless Data Integration:&lt;/strong&gt; Vonage's implementation of &lt;a href="https://www.rapidionline.com/blog/top-salesforce-integration-tools"&gt;MuleSoft&lt;/a&gt; was a game-changer, allowing it to bridge disparate data systems with a unique identifier. This integration facilitated a unified view of customer data across teams, setting the stage for deeper customer relationships and improved cross-selling opportunities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Efficiency in Sales Operations:&lt;/strong&gt; Vonage harnessed the power of Sales Cloud to streamline its quoting process, slashing the time from four days to mere minutes. This minimized human error and empowered sales agents with rapid access to product information, significantly boosting sales efficiency.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Visualization and Decision Making:&lt;/strong&gt; The deployment of Tableau enabled Vonage to achieve a 360-degree view of its customers by visualizing data across business units on a single dashboard. This strategic move enhanced executive decision-making and provided clear insights into sales operations, driving informed go-to-market strategies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Partnership for the Future:&lt;/strong&gt; Vonage's collaboration with Salesforce Professional Services and its utilization of the Premier Success Plan illustrates a forward-thinking approach to leveraging technology for business growth. This partnership underscores the importance of expert guidance and tailored solutions in realizing technological aspirations.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Vonage's journey with Salesforce AI vividly illustrates how automation and intelligent data management can propel a company toward unprecedented operational efficiency and customer-centric growth. It is an inspiring success story for organizations looking to navigate the complexities of digital transformation in the telecommunications industry and beyond.&lt;/p&gt;

&lt;p&gt;Read more about this &lt;a href="https://www.salesforce.com/resources/customer-stories/vonage-telecommunications-automation/"&gt;case study&lt;/a&gt; on Salesforce’s customer stories. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;br&gt;
A conclusion is the final part or section of any writing or discourse. It sums up the whole discussion and gives closure to the reader. Be it an essay, research paper, or even a speech—the conclusion is that last attempt to leave a lasting impact and ensure a satisfying end.&lt;/p&gt;

&lt;p&gt;Essentially, the conclusion summarizes the main points or arguments in the body of the work; in other words, it reminds the reader of the key ideas and restates the overall message underlined in the whole writing. Finally, the outline of the main points and their importance in the topic of discussion will be restated, making everything distinct from the meaning of the paper to the reader.&lt;/p&gt;

&lt;p&gt;In addition to summarizing and providing a personal perspective, a good conclusion also offers closure to the reader. The conclusion is meant to sum up any loose ends or questions that may have arisen during the writing. This may be achieved by offering solutions, pointing out the need for further research, or giving a call to action. A sense of completion is given as the conclusion reaches out to the reader, letting the reader know what the writer wanted to get across to him.&lt;/p&gt;

&lt;p&gt;The article is written by &lt;a href="https://www.linkedin.com/in/gia-radnai-a7402b21b/"&gt;Gia Radnai &lt;/a&gt;&lt;/p&gt;

</description>
      <category>saleforce</category>
      <category>ai</category>
      <category>datascience</category>
      <category>analytics</category>
    </item>
    <item>
      <title>Git Security: Best Practices for Keeping Your Code Safe</title>
      <dc:creator>PRANKUR PANDEY</dc:creator>
      <pubDate>Wed, 24 Jan 2024 10:56:05 +0000</pubDate>
      <link>https://dev.to/prankurpandeyy/git-security-best-practices-for-keeping-your-code-safe-1nep</link>
      <guid>https://dev.to/prankurpandeyy/git-security-best-practices-for-keeping-your-code-safe-1nep</guid>
      <description>&lt;p&gt;Did you know that around 99% of open-source projects use &lt;a href="https://www.google.com/url?q=https://www.google.com/url?q%3Dhttps://hutte.io/trails/git-based-development-statistics/%26amp;sa%3DD%26amp;source%3Deditors%26amp;ust%3D1706098631204264%26amp;usg%3DAOvVaw2wbOyXIokWcgv-GRtuX_00&amp;amp;sa=D&amp;amp;source=docs&amp;amp;ust=1706098631210856&amp;amp;usg=AOvVaw0eghFIrBTVuIZwuyI1XCU6" rel="noopener noreferrer"&gt;version control&lt;/a&gt;, and Git is the most popular tool? Git security is of utmost importance due to the sensitive nature of the code and the potential risks associated with unauthorized access, data breaches, and malicious attacks.&lt;/p&gt;

&lt;p&gt;Ensuring the security of Git repositories and the code within them is crucial for maintaining the integrity and confidentiality of the software.&lt;/p&gt;

&lt;p&gt;This article aims to highlight the significance of Git security and provide practical tips and best practices for securing Git repositories. It will discuss the potential security vulnerabilities in Git, such as unauthorized access, code injection, and data manipulation, and offer guidance on mitigating them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Git Security Risks
&lt;/h2&gt;

&lt;p&gt;Git, as a version control system, has its own set of security risks that users need to be aware of. Common security threats when using Git include unauthorized access, code injection, malicious commits, and credential theft.&lt;/p&gt;

&lt;p&gt;Unauthorized access can occur when someone gains access to a Git repository without permission. This can lead to sensitive code and data being exposed or modified without authorization. Code injection is another security threat, where malicious code is inserted into the Git repository, compromising the integrity of the codebase.&lt;/p&gt;

&lt;p&gt;Malicious commits are a security threat where unauthorized changes are made to the codebase, potentially introducing vulnerabilities or backdoors. Finally, credential theft is a major concern when using Git, as stolen credentials can lead to unauthorized access to repositories and sensitive information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices For Git Security
&lt;/h2&gt;

&lt;p&gt;To maintain a secure and effective Git workflow, it's important to adhere to certain best practices. These recommendations can help protect your code and sensitive information from unauthorized access or compromise.&lt;/p&gt;

&lt;p&gt;This next section will touch on 5 of the most important best practices around Git security. These include ensuring Git is kept up to date, not committing sensitive information, guarding access to Git repositories, making sure to keep your branches protected, and signing your work with GPG keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ensure Git Is Kept Up To Date
&lt;/h2&gt;

&lt;p&gt;To ensure Git is kept up to date, it is important to check for updates periodically. This can be done by running the command git --version and comparing the version with the latest stable release.&lt;/p&gt;

&lt;p&gt;If an update is available, consider using package managers or visiting Git's official website to install the latest version. It is also essential to monitor security advisories related to Git and update promptly in case of any security patches.&lt;/p&gt;

&lt;p&gt;Security updates protect the system and its data from potential vulnerabilities. Therefore, staying proactive and consistently updating Git will help ensure the software remains secure and performs optimally.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't Commit Sensitive Information
&lt;/h2&gt;

&lt;p&gt;When working with Git, it is important to be cautious about committing sensitive information such as passwords, API keys, and configuration files. One way to prevent accidental commits of such sensitive data is by using a .gitignore file.&lt;/p&gt;

&lt;p&gt;This file allows you to specify certain files or directories that should be excluded from version control. By adding sensitive files or directories to the .gitignore file, you can ensure they are not accidentally committed or pushed to a remote repository.&lt;/p&gt;

&lt;p&gt;In addition to using a .gitignore file, it is also recommended to utilize tools like git-secrets to prevent the accidental commit of sensitive data further. Git-secrets is a tool that scans commits, commits messages, and other aspects of your Git repository to prevent any leaks of sensitive information.&lt;/p&gt;

&lt;p&gt;Remember, the security of your codebase is crucial, and it is important to be mindful of the files and information you are committing. Always exercise caution and adhere to best practices when handling sensitive data in your Git repositories.&lt;/p&gt;

&lt;h2&gt;
  
  
  Guard Access To Git Repositories
&lt;/h2&gt;

&lt;p&gt;To ensure the security of our Git repositories, we have implemented strong authentication mechanisms such as SSH keys and personal access tokens for all repository access. This ensures that only authorized individuals can access the code base and make changes.&lt;/p&gt;

&lt;p&gt;We also regularly review and update access permissions for collaborators based on their roles within the organization. This allows us to ensure that individuals only have access to the repositories necessary for their specific responsibilities, thus reducing the risk of unauthorized access.&lt;/p&gt;

&lt;p&gt;In addition, we have enabled two-factor authentication (2FA) for an added layer of security. This requires users to provide a second form of authentication, such as a code sent to their phone and their password when accessing the repositories. This significantly reduces the risk of unauthorized access if a password is compromised.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make Sure To Keep Your Branches Protected
&lt;/h2&gt;

&lt;p&gt;To keep your branches protected, it is important to restrict direct pushes to main branches and instead encourage pull requests for code review. This ensures that all changes to the main branches go through a thorough review process before being merged.&lt;/p&gt;

&lt;p&gt;Setting branch protection rules is essential to enforce code review, status checks, and other criteria before merging. This helps maintain the quality of the codebase and prevents any potentially harmful or unreviewed code from being merged.&lt;/p&gt;

&lt;p&gt;Regularly auditing branch permissions is crucial to remove unnecessary access and ensure that only the appropriate team members can make changes to the codebase. This helps to prevent any unauthorized changes and maintains the security and integrity of the code repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sign Your Work With GPG keys
&lt;/h2&gt;

&lt;p&gt;First, to begin signing your work with GPG keys, generate a GPG key pair using the command gpg --gen-key. Follow the prompts to create a strong key pair associated with your Git identity.&lt;/p&gt;

&lt;p&gt;Next, configure Git to use the GPG key for signing commits using the command git config --global user.signingkey . Replace with the ID of the key you generated.&lt;/p&gt;

&lt;p&gt;Once your GPG key is set up with Git, it's important to encourage contributors to sign their commits. This creates a verifiable trail of code changes, helping to maintain the integrity and authenticity of the project's source code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Word
&lt;/h2&gt;

&lt;p&gt;As we wrap up, let's quickly recap some of the best practices we've discussed. It's important to always follow a clear and consistent Git workflow, using branches, pull requests, and code reviews to ensure code quality and collaboration. Additionally, we cannot overemphasize the importance of Git security. This includes regularly updating Git, using HTTPS or SSH for remote repositories, and being cautious with authentication credentials.&lt;/p&gt;

&lt;p&gt;As we move forward, let's encourage continuous improvement with our Git processes. This means regularly seeking feedback, learning new Git techniques, and staying updated on best practices in the industry. By staying proactive and open to change, we can ensure that our Git workflows are always optimized for efficiency and collaboration.&lt;/p&gt;

&lt;p&gt;Ultimately, the key to mastering Git lies in a commitment to ongoing learning and improvement. With this mindset, we can continue to elevate our development processes and produce higher quality code.&lt;/p&gt;

</description>
      <category>git</category>
      <category>security</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Master Front-End Basics: The Perfect Blend of HTML, CSS, and JS to Jumpstart Your React Journey</title>
      <dc:creator>PRANKUR PANDEY</dc:creator>
      <pubDate>Mon, 25 Jul 2022 12:14:47 +0000</pubDate>
      <link>https://dev.to/prankurpandeyy/just-enough-html-css-and-js-to-get-started-with-react-15jf</link>
      <guid>https://dev.to/prankurpandeyy/just-enough-html-css-and-js-to-get-started-with-react-15jf</guid>
      <description>&lt;p&gt;As a technical writer who has completed five React projects, I’ve gained hands-on experience in using React to build advanced user interfaces. To get started with React, it's essential to have a solid understanding of HTML, CSS, and JavaScript (JS). These three technologies form the foundation of web development and are crucial for creating dynamic and responsive applications.&lt;/p&gt;

&lt;p&gt;While learning these technologies may seem daunting, you don’t need to know everything at once. Instead, focus on the core concepts you’ll use most often in your React projects.&lt;/p&gt;

&lt;p&gt;how much you should know about these technologies ? It completely depends upon your project requirements as&lt;/p&gt;

&lt;p&gt;HTML, CSS, and JS have numerous elements and properties that are updated regularly, so it's crucial to focus on the ones that you will use frequently. This article will provide you with a guide on the fundamental HTML, CSS, and JS concepts that will be useful as you start building React projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Learn HTML, CSS, and JavaScript for React?
&lt;/h2&gt;

&lt;p&gt;React is a powerful library for building user interfaces, but it requires a good grasp of HTML, CSS, and JS. If you're not comfortable with these foundational technologies, you’ll likely face challenges as you build your React apps.&lt;/p&gt;

&lt;p&gt;You might wonder: "There are so many HTML elements, CSS properties, and JS concepts—how much should I learn before diving into React?"&lt;/p&gt;

&lt;p&gt;The answer depends on your project requirements. HTML, CSS, and JS are vast, and they’re constantly evolving. However, some concepts will be used in almost every React project, no matter the size or complexity.&lt;br&gt;
there are a few things that you will use no matter how big/small your react projects are?&lt;/p&gt;

&lt;p&gt;So let's get started as you know&lt;/p&gt;

&lt;p&gt;a)HTML is for structuring  web page&lt;br&gt;
b)CSS is for the designing web page&lt;br&gt;
c)JS is for logic&lt;/p&gt;

&lt;p&gt;So here are some fundamentals of HTML CSS and JS that will be very useful if you are just starting with the web, remember you have to make something of your own, even a small calculator program will add value to it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Core HTML Concepts for React&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML (HyperText Markup Language) is used to structure web pages. In React, you'll frequently use HTML elements to define your UI components.&lt;/p&gt;

&lt;p&gt;Here are some important HTML concepts to understand before starting with React:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Semantic HTML&lt;/strong&gt;&lt;br&gt;
Semantic HTML elements like &lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;footer&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt; improve accessibility and SEO. While React itself is not inherently SEO-friendly, using semantic HTML ensures better indexing by search engines and improves the user experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
These are essential for grouping elements on the page. While &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; is a block-level element and &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; is an inline element, both are widely used in React components.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Links&lt;/strong&gt;&lt;br&gt;
Links (&lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;) are used for navigation, and in React, you'll often use the Link component from React Router to navigate between pages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Images&lt;/strong&gt;&lt;br&gt;
Including images (&lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;) is essential for a visually appealing UI. React efficiently handles image rendering, making it a vital part of most projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Lists&lt;/strong&gt;&lt;br&gt;
Ordered (&lt;code&gt;&amp;lt;ol&amp;gt;&lt;/code&gt;) and unordered lists (&lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;) are frequently used in headers, footers, and navigation menus. You’ll also use lists to render dynamic content in React, such as with the .map() function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Forms and Inputs&lt;/strong&gt;&lt;br&gt;
Forms (&lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt;) and input elements (&lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt;) are crucial for gathering user data. React makes managing forms easier through controlled components.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. IDs and Classes&lt;/strong&gt;&lt;br&gt;
Using id and class attributes helps with styling and targeting elements in JavaScript.&lt;/p&gt;

&lt;p&gt;By understanding these core HTML concepts, you’ll be ready to structure your first React app.&lt;/p&gt;

&lt;p&gt;If you know these tags then you can easily start structuring your first webpage.&lt;/p&gt;

&lt;p&gt;Now we have made the structure of the web page it's time to beautify it, to do so will use CSS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key CSS Concepts for React:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CSS (Cascading Style Sheets) is used to style HTML elements and create visually appealing web pages. In React, you’ll use CSS to style your components and make them responsive.&lt;/p&gt;

&lt;p&gt;Here are some important CSS concepts to master:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Height and Width&lt;/strong&gt;
These properties control the size of elements. Understanding how to set dimensions is crucial for layout design.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Colors and Fonts&lt;/strong&gt;
Learn how to apply colors and font styles to make your UI more engaging. CSS offers various ways to define colors (hex, RGB, etc.) and font properties (size, weight, etc.).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;3. CSS Units&lt;/strong&gt;&lt;br&gt;
Understanding units like rem, px, and % is essential for responsive design. Each unit behaves differently, so knowing when to use them will help you create scalable UIs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.Flexbox and Grid&lt;/strong&gt;&lt;br&gt;
These layout systems are vital for aligning and positioning elements in a responsive way. Flexbox is particularly useful for smaller projects, while Grid is great for complex layouts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.Positioning&lt;/strong&gt;&lt;br&gt;
The position property helps control the placement of elements on a page. Whether you need to fix an element to the top of the page or push to is to bottom.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6.Borders&lt;/strong&gt;&lt;br&gt;
Borders not only help in styling elements but also assist in debugging CSS issues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7.Text Properties&lt;/strong&gt;&lt;br&gt;
   Mastering text properties like font-size, text-align, and line-height will help you control typography in your React app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8.Backgrounds&lt;/strong&gt;&lt;br&gt;
Backgrounds can include both colors and images. Knowing how to manipulate backgrounds can significantly enhance your app’s visual appeal.&lt;/p&gt;

&lt;p&gt;With these CSS skills, you can style and beautify your React components, making them look professional and polished.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Essential JavaScript Concepts for React:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JavaScript (JS) is the backbone of interactivity in web development. In React, JS allows you to manage state, handle events, and interact with the DOM (Document Object Model).&lt;/p&gt;

&lt;p&gt;Here are some key JS concepts to know:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.ES6+ Syntax&lt;/strong&gt;&lt;br&gt;
React heavily relies on modern JavaScript features like arrow functions, destructuring, template literals, and the spread/rest operators. Familiarize yourself with these features to write clean, efficient React code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.JS Arrays&lt;/strong&gt;&lt;br&gt;
Arrays are crucial in React for handling lists of data. You’ll often use methods like .map() to render lists dynamically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.JS Objects&lt;/strong&gt;&lt;br&gt;
Objects store data in key-value pairs. You’ll frequently use objects to manage state in React.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.Clean Code Principles&lt;/strong&gt;&lt;br&gt;
Writing clean, maintainable code is essential in React. Follow best practices, such as giving functions and variables descriptive names and keeping functions focused on a single task.&lt;/p&gt;

&lt;p&gt;Here’s an example of clean React code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Demo&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setData&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;([]);&lt;/span&gt;

  &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchData&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://jsonplaceholder.typicode.com/posts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;fetchData&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;`&amp;lt;div&amp;gt;`&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s2"&gt;`&amp;lt;h1 key={item.id}&amp;gt;`&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&amp;lt;/h1&amp;gt;`&lt;/span&gt;
      &lt;span class="p"&gt;))}&lt;/span&gt;
    &lt;span class="s2"&gt;`&amp;lt;/div&amp;gt;`&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Demo&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we create a simple component that fetches data from an API and displays it. The function names are self-explanatory, and the code is structured for readability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.Loops&lt;/strong&gt;&lt;br&gt;
Loops are like loops means it will iterate until they found the specific condition,there are many loops like &lt;strong&gt;for&lt;/strong&gt; , &lt;strong&gt;foreach&lt;/strong&gt;,&lt;strong&gt;while&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6.Higher Order Functions&lt;/strong&gt;&lt;br&gt;
Map, filter, and reduce are higher order functions (HOFs) in JavaScript that are commonly used to manipulate data:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Map&lt;/strong&gt;&lt;br&gt;
Creates a new array by applying a callback function to each element in the original array.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Filter&lt;/strong&gt;&lt;br&gt;
Creates a new array by selecting elements that pass a condition specified by a callback function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reduce&lt;/strong&gt;&lt;br&gt;
Applies a callback function to each element in an array to produce a single value. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7.String &amp;amp; Conditions&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Strings :&lt;/strong&gt;&lt;br&gt;
Strings are bunch of characters having sound understanding of string manipulations helps in dealing with string related work.&lt;br&gt;
&lt;strong&gt;Conditions :&lt;/strong&gt;&lt;br&gt;
Conditions are backbone of any programming language so does with javascript ,Conditions helps to designs the systems more logically and handling edge level cases, some examples like** if &lt;strong&gt;, **if-else&lt;/strong&gt;,*&lt;em&gt;if-else-if *&lt;/em&gt; are mandatory to understand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
Mastering the core concepts of HTML, CSS, and JavaScript is essential to building React projects. You don’t need to know everything upfront, but focusing on the key concepts discussed in this article will give you a solid foundation for building functional and beautiful UIs.&lt;/p&gt;

&lt;p&gt;As you gain experience, you'll naturally expand your knowledge and skills, allowing you to take on more advanced React projects.&lt;/p&gt;

&lt;p&gt;If you found this guide helpful, feel free to share it and start building your first React app!&lt;br&gt;
You can connect to me here : &lt;a href="https://linkedin.com/in/prankurpandeyy" rel="noopener noreferrer"&gt;LINKEDIN&lt;/a&gt; &lt;br&gt;
&lt;a href="https://x.com/prankurpandeyy" rel="noopener noreferrer"&gt;TWITTER&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
