Created
July 6, 2018 06:23
-
-
Save itsmunim/83fa178ede7d4f4c9a854d6844e7bbab to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Greeting({greeting}) { | |
| return <h1>{greeting}</h1>; | |
| } | |
| class LanguageGreeting extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.fetchGreetingsInDifferentLanguages(); | |
| } | |
| fetchGreetingsInDifferentLanguages() { | |
| // Some network call to fetch all the greetings in different languages | |
| } | |
| render() { | |
| return (<div> | |
| { | |
| this.languageGreetings.map(lG => <Greeting greeting={lG}></Greeting>); | |
| } | |
| </div>); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment