When attempting to prevent scrolling on the page by using style='overflow-y: auto;'
:
render() {
return (
<div style={{overflow-y: auto}}>
<div>{this.props.title}</div>
<div>{this.props.children}</div>
</div>
);
}
An error is being thrown by Webpack:
https://i.sstatic.net/8PD8M.png
Is there an alternative approach if setting overflow-y
is not possible? How can we disable page scrolling in a React
application (which also uses React-Bootstrap
)?