1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | import PropTypes from 'prop-types'; import { Component } from 'react'; export default class RealmProvider extends Component { static childContextTypes = { reactRealmInstance: PropTypes.object, }; getChildContext() { return { reactRealmInstance: this.props.realm, }; } render() { return this.props.children; } } |