Skip to content

Instantly share code, notes, and snippets.

@jrwebdev
Created February 9, 2018 09:45
Show Gist options
  • Select an option

  • Save jrwebdev/23b92a4786b88a897a2f4a2798bae127 to your computer and use it in GitHub Desktop.

Select an option

Save jrwebdev/23b92a4786b88a897a2f4a2798bae127 to your computer and use it in GitHub Desktop.
Hello Pattern #3
import * as React from 'react';
import withBlueBackground, { InjectedBlueBackgroundProps } from './withBlueBackgroud';
interface HelloProps {
style?: React.CSSProperties;
name: string;
}
const Hello = ({ style, name }: HelloProps & InjectedBlueBackgroundProps) => (
<div style={style}>Hello, {name}!</div>
);
export default withBlueBackground<HelloProps>(Hello);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment