Index File Helper



    Strong Snippets

    Exports the default export from a file with the same name as the directory it's in.

    Useful when you don't want to work inside index files and want clean imports.

    Instead of,

    import CoolSnippet from 'components/common/CoolSnippet/CoolSnippet'

    you get:

    Instead of:

    import CoolSnippet from 'components/common/CoolSnippet

    Shortcut: export.default.file

    export { default } from "./filename";
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.