Recently I was developing an SPFX client-side web part using react JS. In that webpart, I was adding a react component into the existing react component, but the react application shows me error as:
Property welcome does not exist on type ‘JSX.IntrinsicElements’
Now to SPFx development, check out the SharePoint Framework training course.
Property does not exist on type ‘JSX.IntrinsicElements’
The error was coming because I was writing in a small letter.
Actually, when we are developing a component using react we should start with a capital letter, the class name.
import * as React from 'react';
import { IWelcomeProps } from "./IWelcomeProps";
export default class Welcome extends React.Component<IWelcomeProps>
{
public render():JSX.Element{
return(
<h1>{this.props.message}</h1>
)
}
}
Also, while importing the react component we should give the capital letter like below:
<Welcome message={this.props.message} /> :null}
You may like following SharePoint tutorials:
- How to Create Site Columns, Content Type and Custom List using SharePoint Framework
- SharePoint client-side web part configurable properties in Property Pane using spfx
- Retrieve SharePoint list items using SharePoint framework (SPFx)
- Create a list using SharePoint framework (SPFx) Step by Step tutorial
- SharePoint Framework Development
- The entry point for component has a dependency on “@microsoft/sp-http” that is not declared in the manifest react spfx
Here we learned how to solve property then the property name does not exist of type ‘JSX.IntrinsicElements’ in SPFX react client-side part.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site EnjoySharePoint.com
Thanks a lot!! Solved my problem and saved me hours of work