Coder Social home page Coder Social logo

generator-react-webpack-alt's People

Contributors

weblogixx 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

Watchers

 avatar  avatar  avatar  avatar  avatar

generator-react-webpack-alt's Issues

Spread operator syntax error

When I try use spread operator, simple code:

import alt from 'components/Dispatcher';

class NotificationActions {

  send(notification) {
    return notification;
  }

  success(n) {
    this.send({
      level: 'success',
      ...n
    });
  }

  error(n) {
    this.send({
      level: 'error',
      ...n
    });
  }

  warning(n) {
    this.send({
      level: 'warning',
      ...n
    });
  }

  info(n) {
    this.send({
      level: 'info',
      ...n
    });
  }

}

export default alt.createActions(NotificationActions);

Error:

./src/actions/NotificationActions.js
Module build failed: SyntaxError: /Users/cezarluiz/Documents/Web/gobiker-cms/src/actions/NotificationActions.js: Unexpected token (10:9)
   8 | 
   9 |   success(n) {
> 10 |     let {...obj} = n;
     |          ^
  11 | 
  12 |     console.log(obj);
  13 |   }
    at Parser.pp.raise (/Users/cezarluiz/Documents/Web/gobiker-cms/node_modules/babylon/lib/parser/location.js:22:13)
    at Parser.pp.unexpected (/Users/cezarluiz/Documents/Web/gobiker-cms/node_modules/babylon/lib/parser/util.js:91:8)
    at Parser.pp.parseIdentifier (/Users/cezarluiz/Documents/Web/gobiker-cms/node_modules/babylon/lib/parser/expression.js:1009:10)
    at Parser.pp.parsePropertyName (/Users/cezarluiz/Documents/Web/gobiker-cms/node_modules/babylon/lib/parser/expression.js:831:135)
    at Parser.pp.parseObj (/Users/cezarluiz/Documents/Web/gobiker-cms/node_modules/babylon/lib/parser/expression.js:747:12)
    at Parser.pp.parseBindingAtom (/Users/cezarluiz/Documents/Web/gobiker-cms/node_modules/babylon/lib/parser/lval.js:161:19)
    at Parser.pp.parseVarHead (/Users/cezarluiz/Documents/Web/gobiker-cms/node_modules/babylon/lib/parser/statement.js:581:18)
    at Parser.<anonymous> (/Users/cezarluiz/Documents/Web/gobiker-cms/node_modules/babylon/lib/plugins/flow.js:957:13)
    at Parser.parseVarHead (/Users/cezarluiz/Documents/Web/gobiker-cms/node_modules/babylon/lib/plugins/flow.js:957:13)
    at Parser.pp.parseVar (/Users/cezarluiz/Documents/Web/gobiker-cms/node_modules/babylon/lib/parser/statement.js:564:10)
 @ ./src/components/Main.js 23:27-65onSocketMsg.errors @ client:44sock.onmessage @ client:79EventTarget.dispatchEvent @ eventtarget.js:49(anonymous function) @ main.js:274SockJS._transportMessage @ main.js:272EventEmitter.emit @ emitter.js:44WebSocketTransport.ws.onmessage @ websocket.js:35

Generate component with react/addons

Hi, when I generate a new component, the import comes `import React from 'react/addons';``

Error:

Warning: require('react/addons') is deprecated. Access using require('react-addons-{addon}') instead.

Remove /addons resolves.

IE9/10 support

Hello,
Do you know if there is a known issue about Alt IE9/10 support?
Here's my situation:
I created a basic application based on your generator and I implemented a first actions/store structure. Everything is going right when testing under Chrome: I'm able to bind my action to my store. This is not the case under IE9/10: the bound method in the store is not called, with no error message.
Any ideas? Thx.

Update main in package.json to app/index.js?

hi @weblogixx, I just tried to install the generator from a local copy and noticed that
$ yo ./node_modules/generator-react-webpack-alt triggers generators/action/index.js. When settingmain in package.json to generators/app/index.js the local install works. If that change doesn't break other behavior it might be worth an update.

What is the recommended way to integrate with redux-simple-router

I created a clean project using the generator.
then, npm install --save react-router redux-simple-router
but couldn't render components using Routes.
I changed run.js to render the routes:

<Provider store={store}>
    <Router history={history}>
      <Route path="/" component={App}>
        <IndexRoute component={SearchComponent}/>
      </Route>
    </Router>
  </Provider>

Modified reducers/index.js to combine the routeReducer:

import { combineReducers } from 'redux';
import { routeReducer } from 'redux-simple-router'
/* Populated by react-webpack-redux:reducer */
const reducers = { routing: routeReducer, search: require('../reducers/search.js') };

module.exports = combineReducers(reducers);

and added Router.RouteHandler to render under Main.js (AppComponent).
but I keep getting these two errors:

Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of AppComponent.

Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. Check the render method of AppComponent.
Thanks in advanced

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.