Reputation: 57
I am still getting hang of React js. I am trying to export multiple components and i am getting this error "Identifier 'withN' has already been declared" Here is my code for export
const withN = withNamespaces()(App)
export default connect(
mapStateToProps,
{ logOut }
)(withRouter(Header));
Here is my import code
import { withN } from 'react-i18next';
Please tell me what is wrong.
Thanks update: After correcting my export statement as suggested by @octobus, I get this error attached in the image props undefined
Upvotes: 2
Views: 7184
Reputation: 1276
You can't import something and reassign a value to it. The reason you are getting the error is that there is already a declaration of withN
.
Upvotes: 1