Virtual Constructor1 Factory Method Pattern ReactElement.js를 보다가 주석에서 Factory method를 보았다. Factory method(Virtual Constructor)는 무엇인가? // ReactElement.js ("react": "^15.4.2") /** * Factory method to create a new React element. This no longer adheres to * the class pattern, so do not use new to call it. Also, no instanceof check * will work. Instead test $$typeof field against Symbol.for('react.element') to check * if something is a React E.. 2021. 8. 4. 이전 1 다음