mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-02 18:41:17 +00:00
[fix] AppRegistry container layout
Absolute fill positioning provides better default layout for full-screen apps. Fix #528
This commit is contained in:
@@ -40,6 +40,9 @@ Runs the application that was registered under `appKey`. The `appParameters`
|
|||||||
must include the `rootTag` into which the application is rendered, and
|
must include the `rootTag` into which the application is rendered, and
|
||||||
optionally any `initialProps`.
|
optionally any `initialProps`.
|
||||||
|
|
||||||
|
On web, if the `rootTag` is a sub-section of your application it should be
|
||||||
|
styled as `position:relative` and given an explicit height.
|
||||||
|
|
||||||
static **unmountApplicationComponentAtRootTag**(rootTag: HTMLElement)
|
static **unmountApplicationComponentAtRootTag**(rootTag: HTMLElement)
|
||||||
|
|
||||||
To "stop" an application when a view should be destroyed, call
|
To "stop" an application when a view should be destroyed, call
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export default class AppContainer extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<View pointerEvents="box-none" style={styles.appContainer}>
|
<View pointerEvents="box-none" style={[styles.appContainer, StyleSheet.absoluteFill]}>
|
||||||
<View
|
<View
|
||||||
children={this.props.children}
|
children={this.props.children}
|
||||||
key={this.state.mainKey}
|
key={this.state.mainKey}
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ const createReducer = (style, styleProps) => {
|
|||||||
resolvedStyle.flexShrink = 0;
|
resolvedStyle.flexShrink = 0;
|
||||||
}
|
}
|
||||||
if (style.flexBasis == null) {
|
if (style.flexBasis == null) {
|
||||||
resolvedStyle.flexBasis = 'auto'
|
resolvedStyle.flexBasis = 'auto';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user