Skip to content

React Native prop types validation #40

@nick-skriabin

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
  }
}

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