Socially Tutorial Step 9.4


In step 9.4, it says “Update the following files which use parties in import to index”. Does it mean that we need to change the line
import { Parties } from ‘…/…/…/api/parties’;
import { Parties } from ‘…/…/…/api/parties/index’; ?

In the GitHub repository for the tutorial there’s no such change and Socially seems to work fine with both lines.

import { Parties } from '../../../api/parties';

points to ../../../api/parties

Then it looks for parties.js or parties/index.js file.

I will also take a look at 9th chapter of the tutorial.

Thank you :slight_smile:
I also found this information from a tutorial that makes things more understandable:

“ES6’s module system is smart enough to figure out that index.js is the default file in the directory.”