DEV Community

Discussion on: A Simple Approach to Managing API Calls

Collapse
 
xdiepx profile image
Diep Dao

what is the index.js for?

Collapse
 
mmcshinsky profile image
Michael McShinsky

A typical pattern for exporting all files within a folder instead of having a bunch of different imports is done via an index.js. You import all sibling files to this file and then export from there.

Collapse
 
xdiepx profile image
Diep Dao

oh i see

Collapse
 
xdiepx profile image
Diep Dao

Thanks, btw thanks for the tip above really helped me