0

I came to this tricky situation, where I need to "export 2 defaults in my Next _app file (using typescript).

I started to export it for Redux, which I am using in my app

export default wrapper.withRedux(MyApp);

But now I need to translate my app with using next-i18next, where I am importing appWithTranslation and I also need to export it

import { appWithTranslation } from 'next-i18next';
export default appWithTranslation(MyApp);

Is it possible to have 2 export defaults somehow ?

juliomalves
  • 42,130
  • 20
  • 150
  • 146

1 Answers1

0

It's impossible, but you can do either wrapper.withRedux(appWithTranslation(MyAppp)) or appWithTranslation(wrapper.withRedux(MyApp)) (not sure which order you need), so you will get one default export both - with redux and with translation.

Mr. Hedgehog
  • 2,644
  • 1
  • 14
  • 18