Kent C. Dodds 4/1/2018

Pure Modules

Read Original

This article discusses the benefits of writing 'pure' JavaScript modules that export functions instead of executing code on import. It explains how impure modules can lead to unexpected errors, unnecessary operations, and an inability to tree-shake unused code, using code examples to illustrate these performance and maintainability issues.

Pure Modules

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet