diff --git a/examples/simple.js b/examples/simple.js
index afb8f81..6055b96 100644
--- a/examples/simple.js
+++ b/examples/simple.js
@@ -15,21 +15,13 @@ function random() {
}
class Test extends React.Component {
- constructor(props) {
- super(props);
- this.state = this.getInitialState();
- ['onChange', 'setActivityKey', 'reRender', 'toggle'].map(fn => this[fn] = this[fn].bind(this));
+ state = {
+ time: random(),
+ accordion: false,
+ activeKey: ['4'],
}
- getInitialState() {
- return {
- time: random(),
- accordion: false,
- activeKey: ['4'],
- };
- }
-
- onChange(activeKey) {
+ onChange = (activeKey) => {
this.setState({
activeKey,
});
@@ -40,7 +32,7 @@ class Test extends React.Component {
for (let i = 0, len = 3; i < len; i++) {
const key = i + 1;
items.push(
- {text.repeat(this.state.time)}