Barrel Pattern A barrel is a way to roll up exports from several modules into a single module. The barrel itself is a module file that re-exports selected exports of other modules. For each folder where we want a common export, we create an file that will contain the exports for every file of the folder.

2m read timeFrom antoinemesnil.hashnode.dev
Post cover image
Table of contents
Introduction1. Barrel Pattern2. Uses aliases3. Order imports
9 Comments

Sort: