diff --git a/src/docs/frontend/index.mdx b/src/docs/frontend/index.mdx index c30311689b..c4c97afec1 100644 --- a/src/docs/frontend/index.mdx +++ b/src/docs/frontend/index.mdx @@ -68,23 +68,6 @@ Both the `app/components/` and `app/views` folders contain React components. - Use a view for UI that will typically not be reused in other parts of the codebase - Use a component for UI that is designed to be highly reusable. -### PropTypes - -Use them, be explicit, use the shared custom proptypes when possible. - -Prefer `Proptypes.arrayOf` to `PropTypes.array` and `PropTypes.shape` to `PropTypes.object` - -If you’re passing Objects with an important, well defined set of keys (that your component relies on) then define them explicitly with `PropTypes.shape`: - -```javascript -PropTypes.shape({ - username: PropTypes.string.isRequired, - email: PropTypes.string -}) -``` - -If you’re re-using a custom prop-type or passing around a common shared shape like an organization, project, or user, then be sure to import a proptype from our useful collection of custom ones! [https://github.com/getsentry/sentry/blob/master/static/app/sentryTypes.tsx](https://github.com/getsentry/sentry/blob/master/static/app/sentryTypes.tsx) - ### Event handlers We use different prefixes to better distinguish event handlers from event callback props.