Closed danraybernard closed 6 years ago
this.state.currentActive === 'all' ? this.props.getTopBoilerplates() : this.props.getBpsByLang(this.state.currentActive)
This line on the render method is causing the list component to constantly check the currently active language and rerun boilerplate requests. Is there any way we can ensure it only runs once or initialize a null state and somehow run on click only?
this.state.currentActive === 'all' ? this.props.getTopBoilerplates() : this.props.getBpsByLang(this.state.currentActive)
This line on the render method is causing the list component to constantly check the currently active language and rerun boilerplate requests. Is there any way we can ensure it only runs once or initialize a null state and somehow run on click only?