SharePoint Framework: error TS2339: Property 'items' does not exist on type 'Readonly<{}>'


When you encounter the below error, while using state object in react based webpart created by yeoman generator.
error TS2339: Property 'items' does not exist on type 'Readonly<{}>'

Follow these steps
1.Create an interface with the state objects as properties, as below
2.Use the interface in your component class as below

Comments

Post a Comment