# SOLVED : ‘root’ is not defined no-undef

Table of Contents

## Problem

This problem appears like –

ERROR in src\index.js
Line : ‘root’ is not defined no-undef

## Solution

This means , you have used ‘root’ in your code but you haven’t defined it yet, so basically the root can be defined as –

``const root = ReactDOM.createRoot(document.getElementById('root'));``

Just include above lines in code , surely your problem will be solved , if not , then let me know , We will try to solve it.

Thankyou! for reading.