Created
November 26, 2019 18:06
-
-
Save Shadid12/e1e4418dca346c850f6d1a63a421f541 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(props) { | |
switch (props.component.type) { | |
case "A": | |
return <A />; | |
case "B": | |
return <B />; | |
case "C": | |
return <C />; | |
default: | |
return <div>Reload...</div>; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment