You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The app should really run in development mode without this warning (but it's only a problem in development, not production.)
Current behavior
Please include any error messages from the browser console and/or screenshots
The pages editor uses propTypes on forwardRef in a couple of places, but prop types are only allowed on React components. forwardRef(function (props, ref)) doesn't take a component as an argument, so the following prop types are ignored by React.
The text was updated successfully, but these errors were encountered:
eatyourgreens
changed the title
Pageds Editor: Warning: forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?
Pages Editor: Warning: forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?
May 31, 2024
Expected behavior
The app should really run in development mode without this warning (but it's only a problem in development, not production.)
Current behavior
Please include any error messages from the browser console and/or screenshots
The pages editor uses
propTypes
onforwardRef
in a couple of places, but prop types are only allowed on React components.forwardRef(function (props, ref))
doesn't take a component as an argument, so the following prop types are ignored by React.Panoptes-Front-End/app/pages/lab-pages-editor/components/TasksPage/components/EditStepDialog/EditStepDialog.jsx
Lines 117 to 129 in b8cf174
Panoptes-Front-End/app/pages/lab-pages-editor/components/TasksPage/components/NewTaskDialog.jsx
Lines 125 to 134 in b8cf174
forwardRef(function (props, ref))
returns a React component, so what you want to do is something like:Steps to replicate
Load up the app in development mode and these warnings will show up near the top of the console.
Additional information
Noticed while I was chasing down some React development errors that broke #7114.
This will hopefully get easier in React 19, which gets rid of
forwardRef
.The text was updated successfully, but these errors were encountered: