Last active
June 11, 2020 19:08
-
-
Save dinotrnka/96f68ae69c5422bd187e99cfcf2c1864 to your computer and use it in GitHub Desktop.
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
function Factory(item) { | |
switch (item.type) { | |
case 'username': | |
return <Username item={item} />; | |
case 'password': | |
return <Password item={item} />; | |
case 'birthday': | |
return <Birthday item={item} />; | |
case 'gender': | |
return <Gender item={item} />; | |
default: | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment