How to use code highlight in .inc files in VS code as PHP?

.inc is used in various languages. In my case, I use .inc extension in PHP files.

By Default, my vs code editor is not highligthing any code within .inc extension files.

To enable, the highlight option I have done the following steps.

Text Editor Settings

  1. Go to File > Preferences > Settings > Text Editor > Files > Add Item
  2. Add entry *.inc > php
  3. Save

My current VS Code version is 1.74.1

ReactDOM.render is no longer supported in React 18

If you are using ReactDOM.render() in your React 18 app, you will definitely see the below issue.

ReactDOM.render is no longer supported in React 18

The reason is ReactDOM.render is no longer supported in React 18.

Earlier, we used to render the component in below way

ReactDOM.render(<NavBar />, document.getElementById('root'))

If we are using React 18, we should start using createRoot() instead of render()

Example

ReactDOM.createRoot(document.getElementById('root')).render(<NavBar />)

The render() method of the react-dom package is considered legacy starting react-dom version 18.

The method is replaced with the createRoot() method that is exported from react-dom/client.

The createRoot() method takes the root element as a parameter and creates a React root.

Happy Coding!