Created
March 28, 2021 11:55
-
-
Save nabigraphics/a4f04c5cea609efebd33a74109e4c9dd to your computer and use it in GitHub Desktop.
React Fast Refresh 적용하기 - un-named
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Before | |
const WithAuth = (WrappedComponent) => { | |
return (props) => ( | |
...code | |
) | |
} | |
export default WithAuth; | |
// After | |
const WithAuth = (WrappedComponent) => { | |
// return 컴포넌트의 이름 정의 | |
const AuthComponent = (props) => { | |
return ( | |
...code | |
) | |
} | |
} | |
export default WithAuth; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment