Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Sep 22, 2025. It is now read-only.

Commit 1bbac74

Browse filesBrowse files
Updated "how to define propTypes..."
Imported from new prop-types module.
1 parent 00c9e52 commit 1bbac74
Copy full SHA for 1bbac74

1 file changed

+2-1Lines changed: 2 additions & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎react/README.md‎

Copy file name to clipboardExpand all lines: react/README.md
+2-1Lines changed: 2 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,8 @@
557557
- How to define `propTypes`, `defaultProps`, `contextTypes`, etc...
558558

559559
```jsx
560-
import React, { PropTypes } from 'react';
560+
import React from 'react';
561+
import PropTypes from 'prop-types';
561562
562563
const propTypes = {
563564
id: PropTypes.number.isRequired,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.