How To Write Functions In React