React Toolchains

Create React App / component library

https://create-react-app.dev/docs/getting-started/

# cli / offline
$ yarn global add create-react-app $ create-react-app app
# commands / online
$ npx create-react-app app $ yarn create react-app app $ npm init react-app app

https://reactjs.org/docs/create-a-new-react-app.html

Recommended Toolchains

The React team primarily recommends these solutions:

If you’re learning React or creating a new single-page app, use Create React App.

If you’re building a server-rendered website with Node.js, try Next.js.

If you’re building a static content-oriented website, try Gatsby.

If you’re building a component library or integrating with an existing codebase, try More Flexible Toolchains.

Creating a Toolchain from Scratch

A JavaScript build toolchain typically consists of:

A package manager, such as Yarn or npm. It lets you take advantage of a vast ecosystem of third-party packages, and easily install or update them.

A bundler, such as webpack or Parcel. It lets you write modular code and bundle it together into small packages to optimize load time.

A compiler such as Babel. It lets you write modern JavaScript code that still works in older browsers.

If you prefer to set up your own JavaScript toolchain from scratch, check out this guide that re-creates some of the Create React App functionality.

Don’t forget to ensure your custom toolchain is correctly set up for production.

refs

webpack

Parcel



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


React Toolchains的更多相关文章

  1. React——相关工具概述

    Create a New React App Use an integrated toolchain for the best user and developer experience. This ...

  2. React Native系列(6) - 编译安卓私有React-Native代码

    为何要自己编译React Native安卓私有代码 我们在开发中遇到一个HTTP2的问题,React Native安卓客户端在和HTTP2支持的服务器通讯的过程中会有crash,见 React-Nat ...

  3. react native 报错日常 if (_total > 0) { ~~~~~~ ^ ~ 1 error generated.

    node_modules/react-native/React/Base/RCTJavaScriptLoader.mm::: error: ordered comparison between poi ...

  4. react组件的生命周期

    写在前面: 阅读了多遍文章之后,自己总结了一个.一遍加强记忆,和日后回顾. 一.实例化(初始化) var Button = React.createClass({ getInitialState: f ...

  5. 十分钟介绍mobx与react

    原文地址:https://mobxjs.github.io/mobx/getting-started.html 写在前面:本人英语水平有限,主要是写给自己看的,若有哪位同学看到了有问题的地方,请为我指 ...

  6. RxJS + Redux + React = Amazing!(译一)

    今天,我将Youtube上的<RxJS + Redux + React = Amazing!>翻译(+机译)了下来,以供国内的同学学习,英文听力好的同学可以直接看原版视频: https:/ ...

  7. React 入门教程

    React 起源于Facebook内部项目,是一个用来构建用户界面的 javascript 库,相当于MVC架构中的V层框架,与市面上其他框架不同的是,React 把每一个组件当成了一个状态机,组件内 ...

  8. 通往全栈工程师的捷径 —— react

    腾讯Bugly特约作者: 左明 首先,我们来看看 React 在世界范围的热度趋势,下图是关键词“房价”和 “React” 在 Google Trends 上的搜索量对比,蓝色的是 React,红色的 ...

  9. 2017-1-5 天气雨 React 学习笔记

    官方example 中basic-click-counter <script type="text/babel"> var Counter = React.create ...

随机推荐

  1. linux通过ntp同步时间

    1.安装服务 yum install ntp ##安装ntp服务,这个和ntpdate不一样哦,用这个比较好 systemctl start ntpd.service ###启动服务 systemct ...

  2. jQuery 移入显示div,移出当前div,移入到另一个div还是显示。

    jQuery 移入移出 操作div 1 <style type="text/css"> 2 .box{ 3 position: relative; 4 } 5 .box ...

  3. Why failover-based implementations are not enough Redis分布式锁实现 SET resource_name my_random_value NX PX 30000

    核心 SET resource_name my_random_value NX PX 30000 Distributed locks with Redis – Redis https://redis. ...

  4. Spring Cloud与Eureka

    Spring Cloud与Eureka 一.使用SpringCloud注册中心Eureka 1.1 Eureka和Zookeeper对比 1.1.1 Zookeeper保证CP 1.1.2 Eurek ...

  5. C++泛型基础学习

    转载http://blog.csdn.net/xinzheng_wang/article/details/6674847 泛型的基本思想:泛型编程(Generic Programming)是一种语言机 ...

  6. MySQL数据库---配置文件及数据文件

    1.主配置文件 #/usr/local/mysql/bin/mysqld --verbose --help |grep -A 1 'Default options' #cat /etc/my.cnf ...

  7. KVM虚拟化(KVM简介和KVM安装)

    KVM 虚拟化架构分类 寄居虚拟化架构:指在宿主操作系统之上安装和运行虚拟化程序,依赖于宿主操作系统对设备的支持和物理资源的管理. 裸金属虚拟化架构:指直接在硬件上面安装虚拟化软件,再在其上安装操作系 ...

  8. SpringMVC系列(一)核心:处理请求流程

    http://blog.csdn.net/zhaolijing2012/article/details/41596803

  9. LSTM机器学习生成音乐

    目录 LSTM机器学习生成音乐 数据集介绍 将mid转成note数组 将note数组转成mid文件 获取数据集并将其保存 将note进行编号 构建数据集 截取数据 进行one-hot编码 构建模型 训 ...

  10. 国产App为什么如此“臃肿”?!

    引言 App是Application的简称,正是因为有了丰富多彩的各类App,人们就可以通过它们来最大限度地发挥手中设备的功能.本文主要讨论手机上的App,因为手机的硬件和软件与十余年前相比早已有了巨 ...