<commit_before>import { Component, PropTypes} from "react"
import { connect } from "react-redux"

import { Nav, Modal } from "../../blocks"
import { People, Likes } from "../../collections"

import {
  onBoard as onBoardActions,
  liked as likedActions
} from "../../store"


const bindMeteorPerson = (props) => {
  const { dispatch } = props

  let handle = {}
  Tracker.autorun((computation) => {
    handle = computation

    const user = Meteor.user()
    if (user) {
      Meteor.subscribe("people")
      dispatch(onBoardActions.person(People.find().fetch()[0]))

      Meteor.subscribe("likes")
      let likes = Likes.find().fetch().map((like) => like.entryId);

      dispatch(likedActions.set(likes));

    }

    props.dispatch(onBoardActions.authorize(user != null))

  })

  return { handle }

}

@connect()
export default class Global extends Component {

  componentWillMount(){
    let { handle, authorized } = bindMeteorPerson(this.props)
    this.handle = handle

  }

  componentWillUnmount(){
    this.handle.stop()
  }

  render() {
    return (
      <div className="
        push-double-bottom@handheld soft-bottom@handheld
        push-double-left@lap-and-up soft-double-left@lap-and-up
        "
      >
        {this.props.children}
        <Nav />
        <Modal/>
      </div>
    )
  }

}<commit_msg>stick to strict data binding rules<commit_after>import { Component, PropTypes} from "react"
import { connect } from "react-redux"

import { Nav, Modal } from "../../blocks"
import { People, Likes } from "../../collections"

import {
  onBoard as onBoardActions,
  liked as likedActions
} from "../../store"


const bindMeteorPerson = (props) => {
  const { dispatch } = props

  let handle = {}
  Tracker.autorun((computation) => {
    handle = computation

    const user = Meteor.user()
    if (user) {
      Meteor.subscribe("people")
      dispatch(onBoardActions.person(People.find().fetch()[0]))

      Meteor.subscribe("likes")
      let likes = Likes.find().fetch().map((like) => like.entryId);

      dispatch(likedActions.set(likes));

    }

    props.dispatch(onBoardActions.authorize(user != null))

  })

  return { handle }

}

const App = ({ children }) => (
  <div className="
    push-double-bottom@handheld soft-bottom@handheld
    push-double-left@lap-and-up soft-double-left@lap-and-up
    "
  >
    {children}
    <Nav />
    <Modal/>
  </div>
)

@connect()
export default class Global extends Component {

  componentWillMount(){
    let { handle, authorized } = bindMeteorPerson(this.props)
    this.handle = handle

  }

  componentWillUnmount(){
    this.handle.stop()
  }

  render() { return <App {...this.props} /> }

}
{'fraction_non_alphanumeric': 0.15240941352259993, 'fraction_numerical': 0.0007471049682480389, 'mean_word_length': 2.836676217765043, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2619398', 'n_tokens_mistral': 863, 'n_tokens_neox': 831, 'n_words': 178}