Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
remove prop types (#1138)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBa authored Jan 23, 2024
1 parent 23290b0 commit e9341ca
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/docs/frontend/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

1 comment on commit e9341ca

@vercel
Copy link

@vercel vercel bot commented on e9341ca Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

develop – ./

develop-git-master.sentry.dev
develop.sentry.dev

Please sign in to comment.