InfoQ Homepage News React 15.5 Prepares Developers for Big Changes

React 15.5 Prepares Developers for Big Changes

Leia em Português

This item in japanese


Facebook has released React 15.5 to give developers adequate time to adjust to a big change in 16.

In a blog post, Andrew Clark laid out the news that two features, React.PropTypes and React.createClass are being deprecated from the main package. To prepare for version 16, they have been moved into their own packages as a way to improve the code size going forward.

For now, developers will see a warning in the console if they use either of these features from the main package. If a developer doesn't fix it now, their code will break in version 16.

When React was initially released, there was no idiomatic way to create classes in JavaScript, so we provided our own: React.createClass.

Later, classes were added to the language as part of ES2015, so we added the ability to create React components using JavaScript classes. Along with functional components, JavaScript classes are now the preferred way to create components in React.

If recoding an app to use JavaScript classes is not an option, developers can also choose to switch to the create-react-class module available on NPM. This will still require changes to the code, but avoids using JavaScript classes.

The removal of propTypes shouldn't be too big of a loss for most developers. Those that code React in TypeScript or that incorporate Flow into their tool chain have had better ways of type checking React projects. For example, a TypeScript developer might define their props with a strong type:

interface MyProps { firstName: string, lastName: string }

export default class MyComponent extends React.Component<MyProps, any> {


Declaring a class in this way would automatically give a TypeScript developer proper type checking. The use of propTypes would already be redundant.

Version 15.5 is also the last release of the React addons. While some of them have been pushed to other packages, createFragment has been incorporated into version 16 which has support for fragments built-in.

We need your feedback

How might we improve InfoQ for you

Thank you for being an InfoQ reader.

Each year, we seek feedback from our readers to help us improve InfoQ. Would you mind spending 2 minutes to share your feedback in our short survey? Your feedback will directly help us continually evolve how we support you.

Take the Survey

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.