Home Reference Source

Function

Static Public Summary
public

Get default Locale from platform - TODO

public

injectIntl(options: Object)

Decorator to inject React Intl API

public

mountWithIntl(node: Component, context: Object, messages: Object, locale: string): *

Mount the node with Intl provider context.

public

shallowWithIntl(node: ReactComponent, context: Object, messages: Object, locale: string): *

Create a shadow renderer that wraps a node with Intl provider context.

public

toJS()

Decorator to convert ImmutableJS props to JavaScript props

Static Public

public getLocale(): string source

import {getLocale} from 'RNBoilerplate/src/Shared/utils.js'

Get default Locale from platform - TODO

Return:

string

public injectIntl(options: Object) source

import {injectIntl} from 'RNBoilerplate/src/Shared/utils.js'

Decorator to inject React Intl API

Params:

NameTypeAttributeDescription
options Object

React Intl Options

public mountWithIntl(node: Component, context: Object, messages: Object, locale: string): * source

Mount the node with Intl provider context.

Params:

NameTypeAttributeDescription
node Component

Any React Component

context Object
messages Object

A map with keys (id) and messages (value)

locale string

Locale string

Return:

*

public shallowWithIntl(node: ReactComponent, context: Object, messages: Object, locale: string): * source

Create a shadow renderer that wraps a node with Intl provider context.

Params:

NameTypeAttributeDescription
node ReactComponent

Any React Component

context Object
messages Object

A map with keys (id) and messages (value)

locale string

Locale string

Return:

*

public toJS() source

Decorator to convert ImmutableJS props to JavaScript props