| title | MessageProviderProps |
|---|---|
| parent | @messageformat/react |
| grand_parent | API Reference |
Signature:
export interface MessageProviderProps | Property | Modifiers | Type | Description |
|---|---|---|---|
| children | ReactNode | ||
| context? | MessageContext | (Optional) | |
| debug? | 'error' | 'warn' | ((msg: string) => unknown) | (Optional) | |
| locale? | string | (Optional) A key for the locale of the given messages. If uset, will inherit the locale from the parent context, or ultimately use en empty string. | |
| merge? | MessageContext['merge'] | (Optional) By default, top-level namespaces defined in a child MessageProvider overwrite those defined in a parent. Set this to _.merge or some other function with the same arguments as Object.assign to allow for deep merges. |
|
| messages | MessageObject | A hierarchical object containing the messages as boolean, number, string or function values. | |
| onError? | 'error' | 'silent' | 'warn' | ((error: MessageError) => unknown) | (Optional) What to do on errors; most often called if a message is not found. - - - - |
|
| pathSep? | string | null | (Optional) By default, . in a <Message id> splits the path into parts, such that e.g. 'a.b' is equivalent to ['a', 'b']. Use this option to customize or disable this behaviour (by setting it to null). |