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
12 changes: 12 additions & 0 deletions 16-markdown-preview/setup/src/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
// Importing the React library, which is essential for building React components
import React from 'react';

// Importing the ReactDOM library, which is used to render React components to the DOM
import ReactDOM from 'react-dom/client';

// Importing the CSS file to apply global styles to the application
import './index.css';

// Importing the main App component, which serves as the root component of the application
import App from './App';

// Creating the root element for rendering the React application
// This refers to the 'root' div in the HTML file
const root = ReactDOM.createRoot(document.getElementById('root'));

// Rendering the application using the root element
// Wrapping <App /> with <React.StrictMode> to highlight potential problems in the application during development
root.render(
<React.StrictMode>
<App />
Expand Down