Skip to content

React Native prop types validation #40

Description

@nick-skriabin

React fails to validate View on GatewayDest as a value of component property.

Failed prop type: Invalid prop `component` supplied to `GatewayDest`.

Code:

import React, {Component} from 'react'
import {View} from 'react-native'
import {GatewayProvider, GatewayDest} from 'react-gateway'

class RootComponent extends Component {

  /* ... */

  render () {
    const RootRoute = createRootRoute(this.state.isAuthorized)
    return this.state.isReady ? (
      <GatewayProvider>
        <View style={{flex: 1}}>
          <RootRoute ref={(el) => (this.rootRoute = el)} />
          <Notifier/>
          <GatewayDest name="inputAccessory" component={View}/>
        </View>
      </GatewayProvider>
    ) : null
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions