So I have these file and folder.
App.js
modules/
user/
index.js
list.js
In list.js I have export default (props) => (...)
In index.js I have export UserList from './list';
And in App.js I have import { UserList } from './modules/user';
Is there something wrong there? Because I got
./src/modules/user/index.js
Syntax error: Unexpected token, expected { (1:7)
> 1 | export UserList from './list';
But I don't see what's wrong here? Help!
Edit: Here's more details of my list.js file, but I don't think it makes a difference because the error is in index.js
import React from 'react';
// more import
export default (props) => (
<List {...props}>
...
</List>
);