Skip to content

Instantly share code, notes, and snippets.

@rogierslag
Created September 26, 2017 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogierslag/31f1de0dae4016bc334e76c5f0d747e3 to your computer and use it in GitHub Desktop.
Save rogierslag/31f1de0dae4016bc334e76c5f0d747e3 to your computer and use it in GitHub Desktop.
Maily example 10 - translation react components
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