Lokymil / react-adaptive

HOC component for adaptive design with React
2 stars 2 forks source link

Typos in README #1

Closed matthis-d closed 5 years ago

matthis-d commented 5 years ago

Hi! I think you made typos in your last example using withSize in your Readme. You are exporting a component called MyComponent whereas you declared a function called myComponent.

I thing the last paragraph should be:

import React from "react";
import { withSize } from "react-adaptive";

const MyComponent = ({ size }) => (<div>My own size is {size.width}</div>);

export default withSize(MyComponent);