Import JavaScript file and call functions using webpack, ES6, ReactJS
Named exports: Let’s say you create a file called utils.js, with utility functions that you want to make available for other modules (e.g. a React component). Then you would make each function a named export: export function add(x, y) { return x + y } export function mutiply(x, y) { return x * y } … Read more