chore(Page): update content PropTypes to reflect supported types#8008
chore(Page): update content PropTypes to reflect supported types#8008alexander-akait merged 3 commits intowebpack:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
alexander-akait
left a comment
There was a problem hiding this comment.
Can you point me where we use string/function?
Also default SHOULD NOT BE ANY
|
If needed, I can adjust the PropTypes further to remove |
Yes, let's make it stricter |
|
Updated the PropTypes to remove |
src/components/Page/Page.jsx
Outdated
| then: PropTypes.func.isRequired, | ||
| default: PropTypes.string, | ||
| then: PropTypes.func, | ||
| default: PropTypes.func, |
There was a problem hiding this comment.
it can be string or function and then is required for shape
There was a problem hiding this comment.
Updated the PropTypes so content can be string, function, or Promise-like and made then required in the shape.
Update
contentPropTypes to reflect the supported content types.The component accepts content as a string, function, or Promise-like object, but the previous PropTypes only supported a Promise shape.