React is saying a function can not be passed as a child - Theo's Typesafe Cult