Skip to content

Instantly share code, notes, and snippets.

@codeocelot
Created December 11, 2017 21:24
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 codeocelot/83aa8ada55fdae5748aad33c51f7cd3a to your computer and use it in GitHub Desktop.
Save codeocelot/83aa8ada55fdae5748aad33c51f7cd3a to your computer and use it in GitHub Desktop.
import React from 'react';
import ReactDOM from 'react-dom';
import Enhancers from './MyEnhancers';
ReactDOM.render(
ToUpperAndUnderscore(<Text text="hello world"/>),
'root'
);
import { compose } from 'redux';
const ToUpper = (Component) => ({ text }) => <Component text={text.toUpper()} \>
const WithUnderscores = (Component) => ({ text }) => <Component text={text.split(' ').join('_')} />
export default compose(ToUpper, WithUnderscores);
// use like this
import React from 'react';
export default ({ text }) => <span >{text} </span >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment