Skip to content

bibixx/notistack-issue-485

Repository files navigation

Minimal reproduction for iamhosseindhv/notistack#485

  1. Install dependencies using yarn (my version is 1.22.17)
yarn install
  1. Run type checking
yarn run type-check
  1. An error should appear
src/main.tsx:8:6 - error TS2786: 'SnackbarProvider' cannot be used as a JSX component.
  Its instance type 'SnackbarProvider' is not a valid JSX element.
    The types returned by 'render()' are incompatible between these types.
      Type 'React.ReactNode' is not assignable to type 'import("/Users/bartoszlegiec/Projects/notistack-issue-485/node_modules/@types/react-transition-group/node_modules/@types/react/index").ReactNode'.
        Type '{}' is not assignable to type 'ReactNode'.

8     <SnackbarProvider>
       ~~~~~~~~~~~~~~~~

NPM

The issues doesn't seem to be happening when using npm

  1. Head to the npm branch

  2. Remove old node_modules

rm -rf node_modules
  1. Install dependencies
npm install
  1. Run type checking
npm run type-check
  1. It should go through successfully, without any errors

Releases

No releases published

Packages

No packages published