javascript - web pack require() or not? react-hot-loader ES6 or jsx? -


i looking @ react-hot-loader boilerplate.
thought using web pack serving javascript in 1 or smaller build.js(name defined), , required use "require('name'). looks boilerplate using es6 "import react 'react';"?


, using react-hot-loader or react-loader sugar ontop of javascript, boilerplate using export default class app extends, es6?

basically same thing. since using babel, allows them use es6 syntax. webpack handles loaders; can see babel loader in webpack config.

this es6 module syntax:

es6 import

import react 'react'; 

es6 export

export default something; 

commonjs import

require('react'); 

commonjs export

module.exports = something; 

Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -