Skip to content

Commit 6584843

Browse files
committed
Updated example bundle and getting-started guide
1 parent 74681c3 commit 6584843

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

docs/getting-started.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const handlers = {
6464
## HotKey Map Context
6565
Key mappings will be passed down the React tree in context to all child components meaning you do not have to explicitly define your key maps everytime you use the `HotKeys` component. You could simply define one root `HotKeys` component with a `keyMap` and all your application would have access to those mappings.
6666

67-
To achieve this currently (pre-[parent-based context](https://github.com/facebook/react/issues/2112) which [**React 0.14** is aiming for](https://github.com/facebook/react/issues/2112#issuecomment-90156578)) we must use the `HotKeyMapMixin` so all our child components receive the key map.
67+
To achieve this currently (pre-[parent-based context](https://github.com/facebook/react/issues/2112) which is now in React `master` but awaiting `0.14` release) we must use the `HotKeyMapMixin` so that all our child components will have access to the keyMap.
6868

6969
```javascript
7070
import {HotKeys, HotKeyMapMixin} from 'react-hotkeys';
@@ -81,7 +81,7 @@ React.createClass({
8181
});
8282
```
8383

84-
When parent-based context comes into play soon you will no longer need the mixin and all children of `HotKeys` with `keyMap` set will simply have access to those mappings.
84+
When parent-based context comes into play soon you will no longer need the mixin and all children of `HotKeys` with `keyMap` set will simply have access to those mappings in their context.
8585

8686
```javascript
8787
import {HotKeys} from 'react-hotkeys';

examples/bundle.js

+8-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<title>react-hotkeys example</title>
44
</head>
55
<body>
6+
<a href="https://github.com/Chrisui/react-hotkeys"><img style="position: absolute; top: 0; right: 0; border: 0;z-index:5;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
67
<div id="container"></div>
78
<script src="./bundle.js"></script>
89
</body>

examples/master/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const App = React.createClass({
3434
<li>Expand or contract a node with `alt+up` or `alt+down` respectively</li>
3535
<li>Delete a node with `delete` or `backspace`</li>
3636
<li>How about the konami code? `up up down down left right left right b a enter`</li>
37+
<li>Want to get started? <a href="https://github.com/Chrisui/react-hotkeys/blob/master/docs/getting-started.md">Read the guide.</a></li>
3738
</ul>
3839
</div>
3940
<HotKeys handlers={handlers} className={'viewport ' + (this.state && this.state.konamiTime ? 'konamiTime' : '')}>

0 commit comments

Comments
 (0)