I'm trying to push some data onto the firebase.
Here is my handleSubmit function in App.js
  handleSubmit = e => {
    e.preventDefault();
    const note = {
      title: this.state.title,
      body: this.state.body
    };
    this.props.saveNotes(note);
    this.setState({
      title: "",
      body: ""
    });
  };
and this is my saveNote function, and it works fine.
function saveNotes(note) {
  database.push(note);
}
I wonder Why pushing onto database is not working with using arrow function like this
function saveNotes(note) {
  return () => database.push(note);
}
 
     
     
    