13

What's the correct value to replace the question marks with and why?

RecentProjectsSection.propTypes = {
  onClose: React.PropTypes.func.isRequired,
  projects: React.PropTypes.array.isRequired,
};

RecentProjectsSection.defaultProps = {
  onClose: ?????
  projects: [],
};
U r s u s
  • 6,680
  • 12
  • 50
  • 88

1 Answers1

19

You need a function, what it does - up to you.

RecentProjectsSection.defaultProps = {
  onClose: () => { 
    // your logic here...

    return;
  }
  projects: [],
};
Lyubomir
  • 19,615
  • 6
  • 55
  • 69