https://pinjarirehan.medium.com/struggling-to-pass-functions-via-props-in-react-heres-the-solution-40a082e01c15