Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HeaderComponent and FooterComponent rendering #33

Closed
SmirnovM91 opened this issue Jun 5, 2019 · 2 comments
Closed

HeaderComponent and FooterComponent rendering #33

SmirnovM91 opened this issue Jun 5, 2019 · 2 comments

Comments

@SmirnovM91
Copy link

HeaderComponent and FooterComponent render many times

export class test extends Component {

    renderHeader = () => {
        console.count('HeaderComponent');
        return (<View />)
    }

    render() {
        return (
            <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
                <Modalize ref={ref => this.modal = ref} HeaderComponent={this.renderHeader}>

                </Modalize>
                <Button onPress={() => this.modal.open()} title='OPEN'></Button>
            </View>
        )
    }
}

export default test
"react-native": "0.59.8",
"react-native-modalize": "^1.0.0-alpha.23"

console.count() prints 9-10 times, is it normal?

@jeremybarbet
Copy link
Owner

Hi!

Yes, you are right. It shouldn't happen that much. Must be related with the say the size of the Header or Footer are calculated. If you have time to look at it, do not hesitate :)

@jeremybarbet jeremybarbet added the 🤕 Valid issue Something isn't working label Jun 6, 2019
@SmirnovM91
Copy link
Author

Ok, will try something to fix it. Thanks

@jeremybarbet jeremybarbet removed the 🤕 Valid issue Something isn't working label Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants