How Does React Tell a Class from a Function?