MsalAuthProvider in React error : 'children' does not exist on type 'IntrinsicAttributes & IAzureADProps'

I am using : react-aad-msal for authentication to Azure from an react-app.

I have configured my authprovider as per documentation : https://www.npmjs.com/package/react-aad-msal#msal-configuration

All is ok and it seems to be working at least a little. But when I try and wrap it around over components like this :

const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);
root.render(
  <React.StrictMode>
    <AzureAD provider={authProvider}>
      <App/>
    </AzureAD>
   </React.StrictMode>

I am getting the error of :

ype '{ children: Element; provider: MsalAuthProvider; }' is not assignable to type 'IntrinsicAttributes & IAzureADProps'.
  Property 'children' does not exist on type 'IntrinsicAttributes & IAzureADProps'

Has anyone come across this problem before ? This is driving me mad...



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation