1 | import React, { Component, PropTypes } from 'react';
|
2 | import {
|
3 | View,
|
4 | } from 'react-native';
|
5 |
|
6 | class ScenneContainer extends Component {
|
7 | static propTypes = {
|
8 | children: PropTypes.element,
|
9 | }
|
10 | static defaultProps = {
|
11 | children: null,
|
12 | }
|
13 | shouldComponentUpdate() {
|
14 | return true;
|
15 | }
|
16 | render() {
|
17 | const child = this.props.children;
|
18 | if (child === null || child === false) {
|
19 | return null;
|
20 | }
|
21 | return React.Children.only(child);
|
22 | }
|
23 | }
|
24 | export default ScenneContainer;
|