Skip to content
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

Fix small issues bundle #209

Merged
merged 2 commits into from
Jun 26, 2016
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion ignite-base/App/Containers/AllComponentsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import '../Components/RoundedButton'
// Examples Render Engine
import ExamplesRegistry from '../Services/ExamplesRegistry'

export default class AllComponentsScreen extends React.Component {
class AllComponentsScreen extends React.Component {

static propTypes = {
navigator: PropTypes.object.isRequired,
Expand Down
2 changes: 1 addition & 1 deletion ignite-base/App/Containers/PresentationScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import RoundedButton from '../Components/RoundedButton'
// Styles
import styles from './Styles/PresentationScreenStyle'

export default class PresentationScreen extends React.Component {
class PresentationScreen extends React.Component {

static propTypes = {
navigator: PropTypes.object.isRequired
Expand Down
2 changes: 1 addition & 1 deletion ignite-base/App/Containers/UsageExamplesScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import I18n from '../I18n/I18n.js'
// Styles
import styles from './Styles/UsageExamplesScreenStyle'

export default class UsageExamplesScreen extends React.Component {
class UsageExamplesScreen extends React.Component {

constructor (props) {
super(props)
Expand Down
2 changes: 1 addition & 1 deletion ignite-generator/container/templates/container.js.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Routes from '../Navigation/Routes'
// Styles
import styles from './Styles/<%= name %>Style'

export default class <%= name %> extends React.Component {
class <%= name %> extends React.Component {

// constructor (props) {
// super(props)
Expand Down
12 changes: 6 additions & 6 deletions ignite-generator/screen/templates/screen.js.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { PropTypes } from 'react'
import { View, ScrollView, Text, LayoutAnimation, DeviceEventEmitter } from 'react-native'
import { View, ScrollView, Text, LayoutAnimation, Keyboard } from 'react-native'
import { connect } from 'react-redux'
import Actions from '../Actions/Creators'
import Routes from '../Navigation/Routes'
Expand All @@ -14,7 +14,7 @@ import styles from './Styles/<%= name %>Style'
// I18n
import I18n from '../I18n/I18n.js'

export default class <%= name %> extends React.Component {
class <%= name %> extends React.Component {

constructor (props) {
super(props)
Expand All @@ -30,8 +30,8 @@ export default class <%= name %> extends React.Component {
componentWillMount () {
// Using keyboardWillShow/Hide looks 1,000 times better, but doesn't work on Android
// TODO: Revisit this if Android begins to support - https://github.com/facebook/react-native/issues/3468
DeviceEventEmitter.addListener('keyboardDidShow', this.keyboardDidShow.bind(this))
DeviceEventEmitter.addListener('keyboardDidHide', this.keyboardDidHide.bind(this))
this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this.keyboardDidShow.bind(this))
this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this.keyboardDidHide.bind(this))

// Configure nav button
this.props.navigator.state.tapHamburger = () => {
Expand All @@ -40,8 +40,8 @@ export default class <%= name %> extends React.Component {
}

componentWillUnmount () {
DeviceEventEmitter.removeAllListeners('keyboardDidShow')
DeviceEventEmitter.removeAllListeners('keyboardDidHide')
this.keyboardDidShowListener.remove()
this.keyboardDidHideListener.remove()
}

keyboardDidShow (e) {
Expand Down