diff --git a/README.md b/README.md
index 0274aa4..a2c5006 100644
--- a/README.md
+++ b/README.md
@@ -52,59 +52,48 @@ modalRef.animateOffset(number);
## Example
```javascript
-import React, { Component } from 'react';
+import React from 'react';
import Modal from 'react-native-simple-modal';
+import {AppRegistry, Text, TouchableOpacity, View} from 'react-native';
-import {
- AppRegistry,
- Text,
- TouchableOpacity,
- View
-} from 'react-native';
-
-class Example extends Component {
- constructor() {
- super();
- this.state = {
- open: false
- };
- }
- render() {
- return (
-
- this.setState({open: true})}>
- Open modal
-
- console.log('modal did open')}
- modalDidClose={() => this.setState({open: false})}
- style={{alignItems: 'center'}}>
-
- Hello world!
- this.setState({offset: -100})}>
- Move modal up
-
- this.setState({offset: 0})}>
- Reset modal position
-
- this.setState({open: false})}>
- Close modal
-
-
-
-
- );
- }
+export default class Example extends React.Component {
+ state = {open: false};
+ render() {
+ return (
+
+ this.setState({open: true})}>
+ Open modal
+
+ console.log('modal did open')}
+ modalDidClose={() => this.setState({open: false})}
+ style={{alignItems: 'center'}}>
+
+ Hello world!
+ this.setState({offset: -100})}>
+ Move modal up
+
+ this.setState({offset: 0})}>
+ Reset modal position
+
+ this.setState({open: false})}>
+ Close modal
+
+
+
+
+ );
+ }
}
-AppRegistry.registerComponent('myapp', () => Example);
+AppRegistry.registerComponent('ExampleModal', () => Example);
```