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
After upgrade to 3.37.0, when you visit a collection that has array or group and refresh the page, it will spamming multiple lines of warning in the console. Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().
Issue started when updating payload to 3.37.0
In my setup it happens on a collection with Upload functionality when the imageSizes array is defined. If I remove imageSizes altogether, the warnings disappear.
Reproduction Steps
Init a payload blank template
Create collection with Upload functionality
add at least 1 configuration to the imageSizes array
Visit the collection page, and refresh the page. The warnings will show up.
Which area(s) are affected?
any collection with Upload functionality and imageSizes array
any collection with a field of type upload, relationTo the collection defined with imageSizes array
Uh oh!
There was an error while loading. Please reload this page.
Describe the Bug
After upgrade to 3.37.0, when you visit a collection that has array or group and refresh the page, it will spamming multiple lines of warning in the console.
Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().
Link to the code that reproduces this issue
https://github.com/anyuj/flooded-warnings
Reproduction Steps
Use the above repo or:
Which area(s) are affected? (Select all that apply)
Any collection that has either a group or an array field
Environment Info
The text was updated successfully, but these errors were encountered: