zenyr / react-native-portal

(deprecated) Trans-locate your render destination, using mitt. Built with react@16 and react-native in mind.
MIT License
69 stars 13 forks source link

react-native throws 'maximum update depth exceeded exception' when you use BlackPortal #5

Closed kostyaVyrodov closed 6 years ago

kostyaVyrodov commented 6 years ago

image

export default class App extends Component {
    render() {
        return (
            <View style={styles.container}>
                <BlackPortal name="simple">
                    <Text>Welcome to React Native!!!</Text>
                </BlackPortal>
                <Text>Welcome to React Native!</Text>
                <WhitePortal name="simple" />
            </View>
        );
    }
}
package.json
"react": "^16.2.0",
"react-native": "^0.52.0",
"react-native-portal": "^1.2.1"
zenyr commented 6 years ago

Pardon me for a late response. I was working on web-only react projects at work. However I've managed to take a look at current code, but apart from minor flow issues I don't see any reason it should fail like that. :grin:

Is <App /> properly wrapped with a <PortalProvider></PortalProvider>?

zenyr commented 6 years ago

Closing issue due to inactivity. Feel free to re-open this if anyone has this issue 🙆‍♂️