FrintJS v2.x doesn't have any breaking API changes itself, but React related packages have upgraded themselves to use latest React v15+.
frint-react
The React packages now need to be installed manually.
$ npm install --save frint frint-react
$ npm install --save react react-dom prop-types frint frint-react
In React v0.14:
import { PropTypes } from 'react';
In React v15+:
import PropTypes from 'prop-types';
Components cannot be created with React.createClass
any more. Use ES6 classes instead:
In React v0.14:
import React from 'react';
const MyComponent = React.createClass({
render() {
return <p>Hello World</p>;
}
});
In React v15+:
import React from 'react';
class MyComponent extends React.Component {
render() {
return <p>Hello World</p>;
}
}
If your component does not need any lifecycle callbacks, better write them as stateless components instead:
import React from 'react';
function MyComponent(props) {
return <p>Hello World</p>;
}