Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions 14-cart/setup/src/index.js
Original file line number Diff line number Diff line change
@@ -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(
<React.StrictMode>
{/* Wrapping the App component with AppProvider for providing context to the entire app */}
<AppProvider>
<App />
</AppProvider>
Expand Down