JavaScript Arrow Functions https://zendev.com/2018/10/01/javascript-arrow-functions-how-why-when.html
bind eip gatsby develop -- --host=0.0.0.0 Prettier VS Code plugin JSX The hybrid “HTML-in-JS” is actually a syntax extension
of JavaScript, for React, called JSX
In pure JavaScript, it looks more like this:
src/pages/index.js
import React from "react" export default () => React.createElement("div", null, "Hello world!") Now you can spot the use of the ‘react’ import! But wait. You’re writing JSX, not pure HTML and
JavaScript. How does the browser read that?
Single File Components single-file components with a .vue extension is build by tools
such as Webpack or Browserify
A single-file component consists of three parts:
- <template> which contains the component’s markup in plain HTML - <script> which exports the component object constructor that consists of all the JS logic within that component - <style> which contains all the component styles CORE Virtual DOM Component-based UI Focus on the view library—separate concerns for routing, state management Official component library for building mobile apps
webpack-simple Webpack is a module bundler for Javascript applications,
it starts at the entrypoint and then build a dependency
graph of the whole application, pulling those dependencies
into one or more bundles that can be included in application.
It supports multiple different file types through loaders,
loaders will take files that have no concept of modules (e.g. css)
and process them in a way that allows them to participate
set registry npm config set registry=http://registry.npm.taobao.org npm config ls -l userconfig = "C:\\Users\\Administrator\\.npmrc" declare variables ES6 comes with two more options to declare your variables: const and let. In JavaScript ES6, you will
rarely find var anymore.
A variable declared with const cannot be re-assigned or re-declared. It cannot get mutated (changed,
modified)
Immutability is embraced in React and its ecosystem. That’s why const should be your default