Define factory that requires react.