Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlplusb committed Apr 18, 2016
2 parents 726259c + 2305551 commit fefc97a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ Give your Components the ability to have render logic based on their height/widt

## Live Demo

Perhaps it's easiest just to show a live example:
Perhaps its easiest just to show a live example:

https://react-sizeme-example-esbefmsitg.now.sh

## Simple Example

Below is a partial example highlighting the use of the library. Read the Usage section in it's entirety for a full description on configuration and usage.
Below is a partial example highlighting the use of the library. Read the Usage section in its entirety for a full description on configuration and usage.

```javascript
class MyComponent extends Component {
Expand All @@ -52,13 +52,13 @@ First install the library.
npm install react-sizeme
```

Then identify a Component you would like to make aware of it's size. We provide you with a helper function called `SizeMe`. You can import it like so:
Then identify a Component you would like to make aware of its size. We provide you with a helper function called `SizeMe`. You can import it like so:

```javascript
import SizeMe from 'react-sizeme';
```

You first have to pass the `SizeMe` function a configuration object. The entire configuration object is optional, as is each of it's properties, in which case the defaults would be used. Here is a full configuration example with the default values for each of the properties:
You first have to pass the `SizeMe` function a configuration object. The entire configuration object is optional, as is each of its properties, in which case the defaults would be used. Here is a full configuration example with the default values for each of the properties:

```javascript
const SizeMeHOC = SizeMe({
Expand Down Expand Up @@ -94,7 +94,7 @@ class MyComponent extends Component {
export default SizeMeHOC(MyComponent); // Wired up here!
```

That's it. It's really useful for doing things like optionally loading a child component based on the available space.
That's it. Its really useful for doing things like optionally loading a child component based on the available space.

Here is an full example of that in action:

Expand Down

0 comments on commit fefc97a

Please sign in to comment.