I have a problem with conditional rendering in reactjs.
Problem
If an environment is prod, then <Sentry.ErrorBoundary> tag should be loaded.
Is there a better way instead of using if with sentrytag and else without sentrytag?
Code:
ReactDOM.render(
<Provider store={store}>
{environment == 'PROD' && <Sentry.ErrorBoundary> }
<Experiment>
<Root />
</Experiment>
{environment == 'PROD' && </Sentry.ErrorBoundary> }
</Provider>, document.getElementById('root'));