I want to export the components withRouter() but I need it to be named without the default
export default withRouter(TopNav);
I've tried
export {TopNav} withRouter(TopNav);
The error I get from the linter is...
Use of default exports is forbidden (no-default-export)tslint(1) is there a way name the export?
Named exports have to be declared so you can do something like this:
export const TopNavWithRouter = withRouter(TopNav);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With