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 */}