gatsby-i18n
Version:
Gatsby plugin that provides i18n support
13 lines (9 loc) • 311 B
JavaScript
import React from 'react';
import PropTypes from 'prop-types';
const I18nContext = React.createContext();
export function I18nProvider({ children, ...rest }) {
return (
<I18nContext.Provider value={{ ...rest }}>{children}</I18nContext.Provider>
);
}
export const I18nConsumer = I18nContext.Consumer;