react can reference a function