I\'m relatively new to React and I\'m wondering what\'s the standard here.
Imagine I have a react-router like this one:
Faced the same error in a similar situation (React Native).
export default class App extends React.Component {
render() {
return (
);
}
}
As indicated in the error prompt the JSX expression requires to have one parent element, hence wrap the elements in the return expression with a parent element. The flex: 1 style was added to allow the element assume the height of the entire screen.
export default class App extends React.Component {
render() {
return (
);
}
}