First we are creating context from WebPartContext in props ts file. import { WebPartContext } from "@microsoft/sp-webpart-base" ; export interface INewCrudWithReactProps { description : string ; context : WebPartContext ; siteUrl : string ; } Then go to main .ts file, supply values to context and siteUrl public render (): void { const element : React . ReactElement < INewCrudWithReactProps > = React . createElement ( NewCrudWithReact , { description : this . properties . description , context : this . context , siteUrl : this . context . pageContext . web . absoluteUrl } ); ReactDom . render ( element , this . domElement ); } Create ISoftwareCatalog ts file. export interface ISoftwareCatalog { Id : number ; Title : string ; ...