i18n for the component age. Auto management react-intl ID.
Support useKey option to intl.formatMessage
import { useIntl } from 'react-intl';
intl.formatMessage({
key: 'foobar',
defaultMessage: 'hello'
});
↓ ↓ ↓ ↓ ↓ ↓
import { useIntl } from 'react-intl';
intl.formatMessage({
key: 'foobar',
defaultMessage: 'hello',
"id": "path.to.file.foobar"
});
https://github.com/akameco/babel-plugin-react-intl-auto/compare/v3.2.0...v3.3.0
relativeTo
#108 by @poolepartyhttps://github.com/akameco/babel-plugin-react-intl-auto/compare/v3.1.1...v3.2.0
https://github.com/akameco/babel-plugin-react-intl-auto/compare/v3.1.0...v3.1.1
https://github.com/akameco/babel-plugin-react-intl-auto/compare/v3.0.1...v3.1.0
https://github.com/akameco/babel-plugin-react-intl-auto/compare/v3.0.0...v3.0.1
Drop node v6.
https://github.com/akameco/babel-plugin-react-intl-auto/compare/v2.3.0...v3.0.0
https://github.com/akameco/babel-plugin-react-intl-auto/compare/v2.2.0...v2.3.0
useIntl
support #72
import { useIntl } from 'react-intl'
const MyComponent = () => {
const intl = useIntl()
const label = intl.formatMessage({ defaultMessage: 'Submit button' })
return <button aria-label={label}>{label}</button>
}
https://github.com/akameco/babel-plugin-react-intl-auto/compare/v2.1.0...v2.2.0
https://github.com/akameco/babel-plugin-react-intl-auto/compare/v2.0.0...v2.1.0
The type definition was updated. If you are using typescript, you need to update to react-intl v3.
https://github.com/akameco/babel-plugin-react-intl-auto/compare/v1.7.2...v2.0.0