Closed jcabrerazuniga closed 11 months ago
you should provide a sandbox link. Just one thing I wonder why there's still a new-created Class component in 2023?
I don't understand... I am using dotnet 7 to create a dotnet react application and while compiling I get the mentioned error. I do prefer to use react classes. I also read the Select component code and uses React 16 so there might be a compatibility issue with 18.
It started to work. It seems I wrongly installed the Select component as it needed to be within the ClientApp folder.
I created the next component using React 18.2.0:
import React, { Component } from 'react'; import Select from 'react-select';
export class Position extends Component { static displayName = Position.name;
}
Yet, I continue getting then next error:
react.development.js:209 Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
Is there a React version I should limit myself to work with?
Thanks Jose