Building and linking this component involved changing the App.js file. Let's take a look at that one first since it passes props down to the EnterBudget component:
// Expenses/app/App.js... import EnterBudget from './components/EnterBudget'; export default class App extends Component { ...
Set the month and year in state, then call _updateBudget:
componentWillMount () { this.setState({ month: dateMethods.getMonth(), year: dateMethods.getYear() }); this._updateBudget(); }
Push EnterBudget to the navigator and pass it two props. Hide the navigation bar so that the user cannot leave without entering a budget for the month:
... _renderEnterBudgetComponent () { this.props.navigator.push({ component: ...