-
Notifications
You must be signed in to change notification settings - Fork 0
Grommet 0.4.0 and React 0.14
The key change here is that we've upgraded Grommet to use React 0.14. You can read more about the changes in React 0.14 here: http://facebook.github.io/react/blog/2015/10/07/react-v0.14.html If you are not using react-router or reflux, you will likely just get some warnings you will want to clean up.
If you are using react-router, you will need to update it to 1.0. You can read more about the changes in react-router 1.0 here: https://github.com/rackt/react-router/blob/master/UPGRADE_GUIDE.md
If you are using reflux, reflux is no longer being maintained and will not work with React 0.14. We have removed dependencies on reflux, which were used in the old medium-app example. We have created a new example application very similar to the medium-app called Ferret (https://github.com/grommet/grommet-ferret). It uses Redux (https://github.com/rackt/redux) for the flux implementation. We've also moved some of the supporting components the medium-app was using out of Grommet into grommet-index (https://github.com/grommet/grommet-index).
We have enhanced Grommet to work well in an ES6 environment. Part of the ES6 enhancements are to remove dependencies on mixins and use utility modules instead. The go forward versions of KeyboardAccelerators and InfiniteScroll are now in utils instead of mixins.
GrommetIntlMixin was removed in favor of react-intl version 2.0. You can read more about that here: https://github.com/yahoo/react-intl/issues/162. This is what you will need to replace if you are using GrommetIntlMixin:
Replace:
var IntlMixin = require('grommet/mixins/GrommetIntlMixin'); by
var ReactIntl = require('react-intl');
var FormattedMessage = ReactIntl.FormattedMessage;
Remove the mixin entry: mixins: [IntlMixin],
Replace the mixin functions calls by ReactIntl.FormattedMessage:
For example: this.getGrommetIntlMessage('Locations Finder’) should be replaced by <FormattedMessage id="Locations Finder" defaultMessage="Locations Finder" />