<commit_before>'use strict';

var React = require('react-native');
var Animated = require('Animated');
var Easing = require('Easing');

var NavButton = require('./NavButton');

var {
  StyleSheet,
  Text,
  View
} = React;


var NavBarContent = React.createClass({

  getInitialState: function() {
    return {
      opacity: this.props.willDisappear ? 1 : 0
    };
  },

  componentWillReceiveProps: function(newProps) {
    if (newProps.route !== this.props.route) {
      this.state.opacity.setValue(this.props.willDisappear ? 1 : 0);

      setTimeout(() => {
        Animated.timing(
          this.state.opacity,
          {
            fromValue: this.props.willDisappear ? 1 : 0,
            toValue: this.props.willDisappear ? 0 : 1,
            duration: 1000,
            easing: Easing.easeOutQuad
          }
        ).start();
      }, 0);
    }
  },

  goBack: function() {
    if (!this.props.willDisappear) {
      this.props.goBack();
    }
  },

  goForward: function(route) {<commit_msg>Corrected error when initializing new animated value<commit_after>'use strict';

var React = require('react-native');
var Animated = require('Animated');
var Easing = require('Easing');

var NavButton = require('./NavButton');

var {
  StyleSheet,
  Text,
  View
} = React;


var NavBarContent = React.createClass({

  getInitialState: function() {
    return {
      opacity: this.props.willDisappear ? new Animated.Value(1) : new Animated.Value(0)
    };
  },

  componentWillReceiveProps: function(newProps) {
    if (newProps.route !== this.props.route) {
      this.state.opacity.setValue(this.props.willDisappear ? 1 : 0);

      setTimeout(() => {
        Animated.timing(
          this.state.opacity,
          {
            fromValue: this.props.willDisappear ? 1 : 0,
            toValue: this.props.willDisappear ? 0 : 1,
            duration: 1000,
            easing: Easing.easeOutQuad
          }
        ).start();
      }, 0);
    }
  },

  goBack: function() {
    if (!this.props.willDisappear) {
      this.props.goBack();
    }
  },

  goForward: function(route) {
{'fraction_non_alphanumeric': 0.13951266125179168, 'fraction_numerical': 0.012422360248447204, 'mean_word_length': 2.427168576104746, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3191256', 'n_tokens_mistral': 700, 'n_tokens_neox': 664, 'n_words': 130}