Giter Club home page Giter Club logo

react-molin's People

Contributors

molin123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-molin's Issues

fetch

手机端不支持直接用fetch()吧?没反应

请教您一个关于Router按需加载的问题

基于React Router 4.1 和 webpack 3、redux,如何做代码分片呢?
以前是在getComponent里面调用这个参数实现的:

require.ensure([], require => {
    let foo = require('./foo');
    reducerRegistry.register({foo: foo}); // 一个导入redux action的策略(使用分片)
    cb(null, require('./PageCom'))
}, 'PageCom');

这是之前的策略,现在我把这个redux加进去,能给点建议吗?

npm run start 报错

npm install 以后 提示了几个警告

npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] requires a peer of webpack@1 || 2 || ^2.1.0-beta || ^2.2.0-rc but none was installed.
npm WARN [email protected] requires a peer of webpack@^2.2.0 but none was installed.
npm WARN [email protected] requires a peer of webpack@^2.2.0 but none was installed.
npm WARN [email protected] requires a peer of react-native@* but none was installed.
npm WARN [email protected] requires a peer of react-native@>=0.20.0 but none was installed.
npm WARN [email protected] No repository field.

npm run start报错
C:\Users\Administrator\Desktop\react-molin-master>npm run start

[email protected] start C:\Users\Administrator\Desktop\react-molin-master
export NODE_ENV=development && webpack-dev-server

'export' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

本地项目引入antd-mobile源码

嗨,可以跟你交流一个额外的话题么:

我最近在使用ant design mobile 做一个公司的项目,想基于它来构建我们自己的react组件库(也就是修改整体less变量,开发我们的组件)。但目前遇到的问题是我clone了ant design mobile的库到了本地,要怎么在我本地公司的项目引入这个antd-mobile到我的项目中呢?

我给你发了邮件,怕你没看见,所以在这留一个issue,如若打扰,还请谅解。

this.props.match.path 找不到

when i use code split with bundle-loader like this:
webpack.js

  entry: {
    'stargate-portal': './src/entry.jsx'
  },
  output: {
    // path: path.resolve(__dirname, 'dist'),
    path: path.resolve(__dirname, outputPath),
    filename: 'res/js/[name].[hash:8].js',
    chunkFilename: 'res/js/[name].[chunkhash:8].bundle.js',
    publicPath: "./"
  },

entry.jsx

const {
  HashRouter,
  Route,
  Link,
  Switch,
  Redirect
} = ReactRouterDOM
import Home from '@/components/home';
// import Console from '@/components/console';
import Console from 'bundle-loader?lazy&name=storgate-portal-console!@/components/console';
// import ListContainer from 'bundle-loader?lazy&name=app-[name]!./app/list.js';
import './main.less';

import Bundle from './bundle';

const ConsoleLazy = () => (
  <Bundle load={Console}>
    {(Console) => <Console />}
  </Bundle>
)
const Portal = () => (
  <HashRouter>
    <div className="stargate-portal">
      <Switch>
        <Route path="/console" component={ConsoleLazy} />
        <Route path="/" component={Home} />
      </Switch>
    </div>
  </HashRouter>
)
ReactDOM.render(
  <Portal />,
  document.getElementById('storgate-portal')
);

console/index.js

  render() {
    const consolePath = this.props.match.path;
    return (
            <Content style={{ background: '#fff', padding: 24, margin: '12px', height: 'auto' }}>
              <Switch>
                <Redirect exact from={`${consolePath}`} to={`${consolePath}/project_detail`} />
                <Route path={`${consolePath}/project_detail`} component={ProjectDetail} />
                <Route exact path={`${consolePath}/app`} component={AppList} />
                <Route path={`${consolePath}/app/:id`} component={AppDetail} />
                <Route exact path={`${consolePath}/contacts`} component={ContactsList} />
                <Route path={`${consolePath}/contacts/:id`} component={ContactsDetail} />
                <Route path={`${consolePath}/logs`} component={LogList} />
              </Switch>
            </Content>
    );
  }

the webpack output result is:
image
But when i get /console. browser take error:

TypeError: Cannot read property 'path' of undefined

what should i do?

没有看懂试例?

看到src文件夹中是一个js文件如app.js对应一个文件夹app对应一个页面吗?可我怎么又在app文件夹中分别看到了index 文件和list文件?list文件不应该是另一个页面吗,我启动服务后看到http://127.0.0.1:1024/home.html#/index 下排版错乱
image

且点击list后是个空白页。

运行npm run start正常 运行npm run start-win报错

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.