1、用npx create-react-app my-app安装项目

2、cd my-app

3、执行 npm  run eject  让配置文件可见

4、npm install --saveDev babel-plugin-transform-decorators-legacy  安装es6装饰器函数解析器插件,因为项目自身不带

5、打开 package.json

"babel": {
"plugins": [
"transform-decorators-legacy"
],
"presets": [
"react-app"
]
}

6、npm install --save mobx mobx-react

7、假如不想配置以上,可以直接使用 react-app-rewired,方法请自行看。

												

1-1、create-react-app 配置 mobx的更多相关文章

  1. 如何扩展 Create React App 的 Webpack 配置

    如何扩展 Create React App 的 Webpack 配置  原文地址https://zhaozhiming.github.io/blog/2018/01/08/create-react-a ...

  2. 深入 Create React App 核心概念

    本文差点难产而死.因为总结的过程中,多次怀疑本文是对官方文档的直接翻译和简单诺列:同时官方文档很全面,全范围的介绍无疑加深了写作的心智负担.但在最终的梳理中,发现走出了一条与众不同的路,于是坚持分享出 ...

  3. 在 .NET Core 5 中集成 Create React app

    翻译自 Camilo Reyes 2021年2月22日的文章 <Integrate Create React app with .NET Core 5> [1] Camilo Reyes ...

  4. tap news:week5 0.0 create react app

    参考https://blog.csdn.net/qtfying/article/details/78665664 先创建文件夹 安装create react app 这个脚手架(facebook官方提 ...

  5. 使用create react app教程

    This project was bootstrapped with Create React App. Below you will find some information on how to ...

  6. Create React App

    Facebook开源了React前端框架(MIT Licence),也同时提供了React脚手架 - create-react-app. create-react-app遵循约定优于配置(Coc)的原 ...

  7. Create React App 安装less 报错

    执行npm run eject 暴露模块 安装 npm i  less less-loader -D 1.打开 react app 的 webpack.config.js const sassRege ...

  8. create react app的 css loader 进行局部配置

    { test: cssRegex, exclude: cssModuleRegex, use: getStyleLoaders({ importLoaders: 1, sourceMap: isEnv ...

  9. [React] Use the Fragment Short Syntax in Create React App 2.0

    create-react-app version 2.0 added a lot of new features. One of the new features is upgrading to Ba ...

  10. [React] {svg, css module, sass} support in Create React App 2.0

    create-react-app version 2.0 added a lot of new features. One of the new features is added the svgr  ...

随机推荐

  1. ASP.NET Core 2.0 in Docker on Windows Containers

    安装Docker for Windows https://store.docker.com/editions/community/docker-ce-desktop-windows 要想将一个ASP. ...

  2. Exp4 恶意代码分析 20164323段钊阳

    网络对抗技术 20164323 Exp4 恶意代码分析 1.如果在工作中怀疑一台主机上有恶意代码,但只是猜想,所有想监控下系统一天天的到底在干些什么.请设计下你想监控的操作有哪些,用什么方法来监控. ...

  3. 【OCP题库-12c】最新CUUG OCP 071考试题库(72题)

    72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...

  4. php socket 简单理解

    以下内容转自:https://www.cnblogs.com/loveyoume/p/6076101.html 和 https://www.cnblogs.com/WuNaiHuaLuo/p/6107 ...

  5. java简单正则验证手机号

    import java.util.regex.Matcher; import java.util.regex.Pattern; /** * @Title:Tadesfza * @Description ...

  6. aspx代码审计-2

    今天和大家分享一下aspx网站的代码审计,漏洞类型为:未授权访问和任意文件下载. 本文作者:i春秋签约作家——非主流 今天看的源码文件就不共享给大家了,本文只作学习只用. 还是先看我们的文件夹目录和d ...

  7. MySQL 跟中文相关

    convert ()

  8. php的session获取不到问题之ie浏览器(yaf框架)

    最近在内网写代码的时候遇到一个很怪异的问题, 花了好长时间调试,在次记录一下问题和解决方法. 问题描述: 内网开发使用的yaf框架,在火狐,谷歌,创建的session和cookie都能获取的到,但是在 ...

  9. MongoDB 数据自动同步到 ElasticSearch

    我们产品中需要全文检索的功能,后端数据存储主要使用了 MySQL + MongoDB,而其中需要检索的内容是在 MongoDB 中的. MongoDB 本身是自带文本索引功能的,但是,不支持中文.术业 ...

  10. mangodb的存储

    mongodb基本命令 mongo #进入mongo命令行show dbs #查看所有数据库 use tutorial #切换到名为tutorial的数据库 show collections #查看数 ...