精华内容
参与话题
问答
  • My app is bootstrapped with <code>create-react-app</code>. Is it possible to use the <code>wix-style-react</code> library in my app without running <code>npm run eject</code> in my <code>create-react...
  • 使用create-react-app my-app 创建一个应用 报错如下 请求解答一下谢谢!!! D:\React>create-react-app my-app Creating a new React app in D:\React\my-app. Installing packages. This might take a couple ...
  • <div><p>I got an error when updating to storybook v5.3 and the new /preset-create-react-app. Apparently babel-preset-react-app was missing and I had to install it. <p>If this package is a requirement ...
  • Use with create-react-app

    2020-12-01 17:30:51
    <div><p>I want to use this package with <a href="https://facebook.github.io/create-react-app/">create-react-app</a> but I have the following problem: 1- When I run <code>yarn start</code> in ...
  • If you've previously installed create-react-app globally via npm install -g create-react-app, we recommend you uninstall the package using npm uninstall -g create-react-app or yarn global remove ...
  • 什么是create-react-app create-react-app是一个js库,使用它能够很方便地建立react项目,免去了建立react项目时配置webpack、调试服务器、运行脚本等麻烦,你只需要使用这个库,便可以一键完成react项目的创建初始...
  • there is no fork of <code>react-scripts, thus <a href="https://github.com/storybookjs/presets/blob/df5ba205cf711aa0830934635f112d74277fcacf/packages/preset-create-react-app/src/index.ts#L71">this ...
  • 手头有一台大学时代的Windows电脑,它此前没有装过create-react-app,只装了node环境。版本信息:node -> 10.16.3,npm -> 6.9.0。前几日闲的无事想给它装个React,结果失败了,报了错,所以有了下面这出。 安装过程...
  • <div><p>I am using <a href="https://github.com/facebook/create-react-app">create-react-app</a> . I have ejected create-react-app using npm run eject.Now i have all the webpack config files. As ...
  • Checkout this branch and build <code>/preset-create-react-app, then in a tmp folder: <pre><code>sh mkdir test-preset-cra && cd test-preset-cra # Use Yarn 2 inside this folder yarn set version...
  • 电脑原先使用npm install -g create-react-app命令全局安装过,根据文档先全局卸载npm uninstall -g create-react-app,然后采用npx create-react-app my-app创建项目。然而,项目创建完后,却只生成了node_modules,...
  • create-react-app-project.zip

    2019-07-11 08:55:18
    在学习了 runoob 上所有关于react 的分解技术后,需要一个实际项目来练手,这个 facebook 开源的 create-react-app 框架就显得十分有用。我对它略微进行了一下扩展,将开源中默认的一个控件界面做成三个。举一反三,...
  • <div><p>I cannot get vscode-eslint to work in Visual Studio Code with create-react-app projects. Command-line linting works fine from the project root, but not in the editor (i.e. I get warnings in ...
  • create-react-app

    2019-03-25 16:09:10
    使用create-react-app 很卡, Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts... $ npm install -g cnpm --registry=https://registry.npm.taobao.org...

    使用create-react-app 很卡,

    Installing packages. This might take a couple of minutes.
    Installing react, react-dom, and react-scripts...
    

    $ npm install -g cnpm --registry=https://registry.npm.taobao.org
    $ cnpm --version

    展开全文
  • shell">rmw-shell, the <a href="https://github.com/TarikHuber/react-most-wanted">react-most-wanted</a> project and the <a href="https://github.com/TarikHuber/create-react-app">create-react-app fork</a>...
  • 在操作官方实例Create React App时,需要执行指令:create-react-app my-app来创建一个新的React应用。由于某原因,在拉取各种资源时,往往会巨慢,一直卡在fetchMetadata: sill mapToRegistry uri ...

    在操作官方实例Create React App时,需要执行指令:

    create-react-app my-app

    来创建一个新的React应用。由于某原因,在拉取各种资源时,往往会巨慢,一直卡在

    fetchMetadata: sill mapToRegistry uri http://registry.npmjs.org/whatwg-fetch1

    解决方案是换源,虽然平常使用cnpm来代替npm,但也只是使用新的指令而已,而在寻求create-react-app的相关配置希望修改registry时失败了,最后发现create-react-app指令默认调用npm,于是直接把npm的register给永久设置过来就好了,这样使用cnpm或者npm就没差别了。

    npm config set registry https://registry.npm.taobao.org
    -- 配置后可通过下面方式来验证是否成功
    npm config get registry
    -- 或npm info express

    设置成功后,再执行create-react-app my-app,就会有惊喜。
    这里写图片描述

    阅读原文

    展开全文
  • <div><p>At work we use <code>create-react-app --typescript</code> to set up new projects, is it possible to integrate this without ejecting?</p><p>该提问来源于开源项目:milesj/babel-plugin-...
  • 然后我试着在create-react-app中引入antd并且进行同样的修改,自定义主题功能是生效的。 问题来了,是否customiz-cra函数只对antd完全支持,而对antd-mobile并不完全兼容? 如果不完全兼容,是否意味着只能...
  • <div><p>As reported in issue #1435, the react preset is only applicable to a react project set up by create-react-app. It causes some confusion whereas the error (unable to locate package react-...
  • create-react-app-antd, 在没有弹出的情况下使用antd创建 React App 在create-react-app中使用 antd一步一步的文档https://ant.design/docs/react/use-with-create-react-app中文:https://ant.design/docs/re
  • yarn add --dev @babel/plugin-proposal-decorators // package.json &quot;babel&quot;: { &quot;plugins&quot;: [ [ &quot;@babel/plugin-proposal-decorators&...: tru

    序言

    react的状态管理redux一直是阻碍react爱好者激情的原因之一,redux灵活强大,每一步都有着很多的规范和概念。总体学习完成以后会对状态有更深层次的理解。但这也意味着学习成本高。学习过程中概念容易混淆。每一次修改数据都要考虑到很多。

    后起之秀

    Github 仓库

    中文文档

    MOBX 推荐使用ESNext装饰器来使用

    1.安装依赖

    yarn add  mobx
    yarn add  mobx-react
    

    2.配置ESNext 装饰器

    yarn add --dev @babel/plugin-proposal-decorators 
    
    // package.json
    
      "babel": {
        "plugins": [
          [
            "@babel/plugin-proposal-decorators",
            {
              "legacy": true
            }
          ]
        ],
        "presets": [
          "react-app"
        ]
      },
    

    3.使用流程

    //1.创建store.js
    
    import {
      observable,
      computed,
      autorun,
      action
    } from "mobx";
    
    class AppState {
      @observable count = 0;
      @observable name = "charles";
      @computed get msg() {
        return `${this.name} say count is ${this.count}`
      }
      @action add() {
        this.count += 1;
      }
    }
    
    const appState = new AppState();
    
    setInterval(() => {
      appState.add()
    }, 1000);
    
    autorun(() => {
      console.log('object', appState.msg)
    });
    
    export default appState;
    
    
    
    //app.js 引入
    import React, { Component } from 'react';
    import { Provider } from "mobx-react"
    import appState from "store"
    
    class App extends Component {
        render() {
            return (
                <Provider appState={appState}>
                   <app />
                </Provider>
            )
        }
    }
    export default App;
    
    
    //组件中使用
    
    import React, { Component } from 'react';
    import { observer, inject } from "mobx-react";
    import PropTypes from "prop-types";
    
    @inject('appState') @observer
    class Navigation extends Component {
        render() {
            console.log(this.props.appState.msg)
            return (
                <div>
                    <Boll />
                </div>
            )
        }
    }
    export default Navigation;
    
    Navigation.PropTypes={
        appState:PropTypes.object
    }
    
    展开全文
  • 前端开源库-create-react-app创建React应用程序,创建没有构建配置的React应用程序。
  • create-react-app example

    2020-11-27 15:31:10
    Many people seem to be having problems including 3rd party JS/CSS into their apps when using create-react-app. A how-to would be great.</p><p>该提问来源于开源项目:react-materialize/react-...

空空如也

1 2 3 4 5 ... 20
收藏数 8,148
精华内容 3,259
关键字:

create-react-app