Corrected the way we use the props and state.