Created
September 26, 2017 20:34
-
-
Save rogierslag/31f1de0dae4016bc334e76c5f0d747e3 to your computer and use it in GitHub Desktop.
Maily example 10 - translation react components
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
let id = 0; | |
const dummyReactElement = (input) => { | |
id++; | |
return React.createElement('span', {key : id}, input); | |
}; | |
const realReactElement = (input) => { | |
id++; | |
return React.cloneElement(input, {key:id}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment