Skip to content

fixed readme example #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ So, to recap, some of the benefits of using this abstraction are:
- `shouldComponentUpdate` is implemented on your behalf.
- The _query functions_ themselves can be formed into a reusable library of queries for all your components.

I am not trying to take away from `react-sizeme`, but I want to highlight that it's a bit more of a low level HOC, and if you want to use it you should be aware of the problems above and consider using your own abstraction or this one.
I am not trying to take away from `react-sizeme`, but I want to highlight that it's a bit more of a low-level HOC, and if you want to use it you should be aware of the problems above and consider using your own abstraction or this one.

## Install

Expand Down Expand Up @@ -216,7 +216,7 @@ class MyComponent extends Component {
return (
<div>
{/* We recieve the following props from our queries */}
I am at {this.props.scale} scale.
I am at {this.props.breakpoint} scale.
</div>
);
}
Expand Down Expand Up @@ -276,7 +276,7 @@ As you can see we expose a `sizeMeConfig`, please see the [`react-sizeme`](https

As it is possible for you to provide props from multiple queries there could be cases where prop clashing occurs. By default we have an order of preference for which prop value should be resolved in the case of conflicts.

__The rule is:__ Custom passed in props take preference followed by the last item in the query collection.
__The rule is:__ Custom passed-in props take preference followed by the last item in the query collection.

Let's illustrate this given the following component:

Expand Down