Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 498 Bytes

connect-your-components.md

File metadata and controls

25 lines (18 loc) · 498 Bytes

Connect your components

withTracker

A HOC function, which allows you to create a container component which provides data to your presentational components.

Example

import Meteor, {withTracker} from 'react-native-meteor';

class Orders extends Component {
  render() {
    const {pendingOrders} = this.props;

    //...
  }
}

export default withTracker(params => {
  return {
    pendingOrders: Meteor.collection('orders').find({status: 'pending'}),
  };
})(Orders);