Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed Prop Type and deprecation warnings when trying to run R-A with Typescript #6454

Closed
ryanmstokes opened this issue Jul 21, 2021 · 1 comment

Comments

@ryanmstokes
Copy link

ryanmstokes commented Jul 21, 2021

What you were expecting:
Following the tutorial I install and set up a React Admin project:

https://marmelab.com/react-admin/Tutorial.html

I should then be able to install Typescript and change files to .tsx and the app should run without any type warnings.

What happened instead:
The App compiles without warnings in the terminal but throws warnings in the web tools console:

index.js:1 Warning: Failed prop type: The prop onExited of ForwardRef(Snackbar) is deprecated. Use the TransitionProps prop instead.

Warning: Failed prop type: The prop onChangePage of ForwardRef(TablePagination) is deprecated. Use the onPageChange prop instead.

Warning: Failed prop type: The prop onChangeRowsPerPage of ForwardRef(TablePagination) is deprecated. Use the onRowsPerPageChange prop instead.

index.js:1 Warning: Failed prop type: The prop onPageChange is marked as required in ForwardRef(TablePagination), but its value is undefined.

Warning: Failed prop type: The prop onChangePage is marked as required in PaginationActions, but its value is undefined.

and also throws a deprecation warning:

Material-UI: The fade color utility was renamed to alpha to better describe its functionality.

You should use import { alpha } from '@material-ui/core/styles'

Steps to reproduce:
Install the app as mentioned above.

Related code:

git clone https://github.com/ryanmstokes/react-admin-typescript
yarn
yarn start

Environment

  • React-admin version: ^3.17.0
  • React version: ^17.0.2
  • Browser: all
@ryanmstokes
Copy link
Author

Sorry this is a duplicate - found the solution in #6421

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant