From b0f81e727be85a19d8f9ad3279d251c2f53b80cd Mon Sep 17 00:00:00 2001 From: Sumanth U <157620444+Sumanth077s@users.noreply.github.com> Date: Thu, 5 Dec 2024 05:31:32 +0530 Subject: [PATCH] Update index.js --- 14-cart/setup/src/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/14-cart/setup/src/index.js b/14-cart/setup/src/index.js index 499c7a700..0094c6b68 100644 --- a/14-cart/setup/src/index.js +++ b/14-cart/setup/src/index.js @@ -1,11 +1,25 @@ +// Importing the React library to create React components import React from 'react'; + +// Importing ReactDOM for rendering React components to the DOM import ReactDOM from 'react-dom/client'; + +// Importing the global CSS file for styling import './index.css'; + +// Importing the main App component import App from './App'; + +// Importing the AppProvider component to manage global state using context import { AppProvider } from './context'; + +// Creating the root element for rendering the React application const root = ReactDOM.createRoot(document.getElementById('root')); + +// Rendering the application within the React.StrictMode for highlighting potential issues root.render( + {/* Wrapping the App component with AppProvider for providing context to the entire app */}