UnsafeComponent
Summary
Renders a component provided via the component
prop, and ensures that
failures in the component's code do not cause state inconsistencies elsewhere in
the application. This component is used by {InjectedComponent} and
{InjectedComponentSet} to isolate third party code that could be buggy.
Occasionally, having your component wrapped in {UnsafeComponent} can cause style
issues. For example, in a Flexbox, the div.unsafe-component-wrapper
will cause
your flex
and order
values to be one level too deep. For these scenarios,
UnsafeComponent looks for containerStyles
on your React component and attaches
them to the wrapper div:
class MyComponent extends React.Component
@displayName: 'MyComponent'
@containerStyles:
flex: 1
order: 2
Class Properties
propTypes
React `props` supported by UnsafeComponent:
component | The {React.Component} to display. All other props will be passed on to this component. |