Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MerryPhotoView

Hierarchy

Index

Constructors

constructor

  • Parameters

    Returns MerryPhotoView

Properties

context

context: any

props

props: Readonly<object> & Readonly<MerryPhotoViewPorps>

refs

refs: object

Type declaration

  • [key: string]: ReactInstance

state

state: Readonly<any>

Methods

forceUpdate

  • forceUpdate(callBack?: undefined | function): void
  • Parameters

    • Optional callBack: undefined | function

    Returns void

onChange

  • onChange(event: any): void

processor

render

  • render(): null | Element
  • Returns null | Element

setState

  • setState<K>(f: function, callback?: undefined | function): void
  • setState<K>(state: Pick<any, K>, callback?: undefined | function): void
  • Type parameters

    • K: keyof any

    Parameters

    • f: function
    • Optional callback: undefined | function

    Returns void

  • Type parameters

    • K: keyof any

    Parameters

    • state: Pick<any, K>
    • Optional callback: undefined | function

    Returns void

Static Optional componentDidCatch

  • componentDidCatch(error: Error, errorInfo: ErrorInfo): void
  • Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.

    Parameters

    • error: Error
    • errorInfo: ErrorInfo

    Returns void

Static Optional componentDidMount

  • componentDidMount(): void
  • Called immediately after a compoment is mounted. Setting state here will trigger re-rendering.

    Returns void

Static Optional componentDidUpdate

  • componentDidUpdate(prevProps: Readonly<MerryPhotoViewPorps>, prevState: Readonly<any>, prevContext: any): void
  • Called immediately after updating occurs. Not called for the initial render.

    Parameters

    Returns void

Static Optional componentWillMount

  • componentWillMount(): void
  • Called immediately before mounting occurs, and before Component#render. Avoid introducing any side-effects or subscriptions in this method.

    Returns void

Static Optional componentWillReceiveProps

  • Called when the component may be receiving new props. React may call this even if props have not changed, so be sure to compare new and existing props if you only want to handle changes.

    Calling Component#setState generally does not trigger this method.

    Parameters

    Returns void

Static Optional componentWillUnmount

  • componentWillUnmount(): void
  • Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as cancelled network requests, or cleaning up any DOM elements created in componentDidMount.

    Returns void

Static Optional componentWillUpdate

  • componentWillUpdate(nextProps: Readonly<MerryPhotoViewPorps>, nextState: Readonly<any>, nextContext: any): void
  • Called immediately before rendering when new props or state is received. Not called for the initial render.

    Note: You cannot call Component#setState here.

    Parameters

    Returns void

Static Optional shouldComponentUpdate

  • shouldComponentUpdate(nextProps: Readonly<MerryPhotoViewPorps>, nextState: Readonly<any>, nextContext: any): boolean
  • Called to determine whether the change in props and state should trigger a re-render.

    Component always returns true. PureComponent implements a shallow comparison on props and state and returns true if any props or states have changed.

    If false is returned, Component#render, componentWillUpdate and componentDidUpdate will not be called.

    Parameters

    Returns boolean

Object literals

Static defaultProps

defaultProps: object

visible

visible: boolean = false

Static propTypes

propTypes: object

data

data: function = PropTypes.arrayOf(PropTypes.shape({source:Platform.OS === "ios"? ImageSourcePropType: PropTypes.oneOfType([PropTypes.shape({uri: PropTypes.string,headers: PropTypes.objectOf(PropTypes.string)}),// Opaque type returned by require('./image.jpg')PropTypes.number,// Multiple sourcesPropTypes.arrayOf(PropTypes.shape({uri: PropTypes.string,width: PropTypes.number,height: PropTypes.number}))]),title: PropTypes.string,summary: PropTypes.string,titleColor: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),summaryColor: PropTypes.oneOfType([PropTypes.string, PropTypes.number])})).isRequired

Type declaration

    • (object: T, key: string, componentName: string, ...rest: any[]): Error | null
    • Parameters

      • object: T
      • key: string
      • componentName: string
      • Rest ...rest: any[]

      Returns Error | null

hideCloseButton

hideCloseButton: Requireable<any> = PropTypes.bool

hideShareButton

hideShareButton: Requireable<any> = PropTypes.bool

hideStatusBar

hideStatusBar: Requireable<any> = PropTypes.bool

initial

initial: function = PropTypes.number.isRequired

Type declaration

    • (object: T, key: string, componentName: string, ...rest: any[]): Error | null
    • Parameters

      • object: T
      • key: string
      • componentName: string
      • Rest ...rest: any[]

      Returns Error | null

onChange

onChange: Requireable<any> = PropTypes.func

onDismiss

onDismiss: function = PropTypes.func.isRequired

Type declaration

    • (object: T, key: string, componentName: string, ...rest: any[]): Error | null
    • Parameters

      • object: T
      • key: string
      • componentName: string
      • Rest ...rest: any[]

      Returns Error | null

shareText

shareText: Requireable<any> = PropTypes.string

visible

visible: Requireable<any> = PropTypes.bool