Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 10 2018 02:41
    Naiba01 commented #1157
  • Sep 05 2018 18:37
    govarthananve commented #1080
  • Sep 05 2018 17:12
    carloquilala opened #1349
  • Aug 07 2018 11:42
    carloquilala edited #1348
  • Aug 07 2018 11:14
    carloquilala opened #1348
  • Jul 31 2018 06:46
    zaoansijia commented #1347
  • Jul 13 2018 01:45
    gapsaras commented #842
  • Jul 12 2018 10:08
    grootendorste commented #930
  • Jul 02 2018 15:06
    aozfen commented #1092
  • Jun 25 2018 17:25
    olliecaine27 closed #1268
  • Jun 03 2018 17:30
    olliecaine27 synchronize #1268
  • Jun 03 2018 17:16
    olliecaine27 synchronize #1268
  • May 22 2018 05:14
    ishan123456789 commented #1220
  • May 19 2018 08:38
    MirShi opened #1347
  • May 14 2018 19:53
    samanthi22 closed #1346
  • May 14 2018 19:53
    samanthi22 commented #1346
  • May 05 2018 17:33
    samanthi22 opened #1346
  • Apr 22 2018 09:28
    m-ketan closed #1319
  • Apr 20 2018 00:40
    matthew-dean commented #658
  • Apr 02 2018 12:36
    AndrewSavetchuk commented #1080
Jason Shin
@JasonShin

I already have it like below

webpackConfig.postcss = [
  cssnano({
    autoprefixer: {
      add: true,
      remove: true,
      browsers: ['> 1%']
    },
    discardComments: {
      removeAll: true
    },
    discardUnused: false,
    mergeIdents: false,
    reduceIdents: false,
    safe: true,
    sourcemap: true
  })
]

how do I add cssnext?
I am basically trying to transpile all cssnext syntax like var(--something)
into standard CSS

aditya shanker tagirisa
@adityashankert
can we pass state to layout ?
Jason Shin
@JasonShin
@adityashankert Yeah
pass it as props
do you have any code examples?
joshuaandrewhoffman
@joshuaandrewhoffman
Nodemon is killing my HMR.. What might I have configured wrong? Hmr works until I do a server side change and trigger a nodemon rerun. It starts working again after I F5 client
Dinesh Ramasamy
@dineshvgp
Is there any best practices to implement app-wide error?
aditya shanker tagirisa
@adityashankert
@JasonShin can you give me example how to pass in plainroute
John Pham
@hprobotic
Hey, anyone have example about custom layout for this kit: like: 1 column layout, 2 column layout for different route
aditya shanker tagirisa
@adityashankert
finally my app is live with starter kit
thanks for great community support
Carson B
@carsonbrown3S

I am running 'npm test' on my app that is using an older version of the starter kit and am getting an error "Module Build Failed. ModuleBuildError". I am using CSS modules and the error messages reference my scss files that I import into my component JS, which works fine outside of tests. Here is one of the many errors I am receiving before the karma server starts:

ERROR in ./~/css-loader?sourceMap&-minimize&modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!./~/postcss-loader!./~/sass-loader?sourceMap!./~/toolbox-loader!./~/react-toolbox/lib/animations/slide-right.scss
    Module build failed: Error: ENOENT: no such file or directory, open '/Users/.../<project_name>/theme.scss'

And this is the error I am receiving after the karma server and Phantom JS browser start:

PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  Error: Cannot find module "./EmptyState.scss"
  at webpack:///src/components/EmptyState/EmptyState.js:9:0 <- tests/test-bundler.js:76202
Carson B
@carsonbrown3S
I figured this out. I needed to pass another key to the karma config from webpack. The key and value pair in my case was toolbox : webpackConfig.toolbox
fabienheureux
@fabienheureux
Hi :), sorry to ask it there, don't know if it's the appropriate place, but anyway..I am kind of stuck here. So, I want to have a simple list of articles (fetched from an external api) on homeview
Does anyone have a working example of such a thing ?
For now, I created a new route (RecentArticles), and tried to add it to home view component, but I have many issues/errors, and not pretty sure where does it come from
I read all docs provided, but as I am quite new to react (and redux as well), I am having difficulties so figure exactly how to do such a basic thing :)
fabienheureux
@fabienheureux
Maybe I should have consider it as a reusable component from the beginning ?
Daniel Winter
@lucidlemon
hi guys
i have a small question that u sure can answer in a second
how can i push a new route onto the redux-router from within a container?
is it ok to do import { push } from 'react-router-redux' followed by const { dispatch } = this.context.store and then push it via dispatch(push('/company')) ?
Ajain Vivek
@ajainvivek
hi guys
deploying application to sub folder isn’t working . I tried setting the basename to ‘/sub/‘ and compile_public_path to ‘/sub/‘ but no luck ?
Can someone help out here
aditya shanker tagirisa
@adityashankert
compiler_public_path is for assets server path while compiling
you should change the dir_dist in config/index.js
Ajain Vivek
@ajainvivek
I have multiple react apps serving under sub folder using browserHistory
assets are loading fine with compiler_public_path
aditya shanker tagirisa
@adityashankert
try changing the dir_dist in config/index.js
Ajain Vivek
@ajainvivek
dir_dist refers to dist mapping right?
when I debug I see the routes point to ‘/‘ index and its relative but the app is served under /sub/
If I change index route ‘/sub/‘ it does work but I need to rename all the routes across
Ajain Vivek
@ajainvivek
ReactTraining/react-router#4195
csjohn
@csjohn
Has anyone tried implementing subroutes using the recommended fractal pattern? (e.g. src/routes/Thing/routes/SubThing). I'm trying to create a nested route (with components and whatnot) but am not quite sure how to wire it up with the rest of the app (Not sure what SubThing/index.js should look like)
that's how i've done it for a product-listing page, and a product-edit page ( /products/:id )
there are some examples here too: davezuko/react-redux-starter-kit#797
csjohn
@csjohn

@mrweissx_twitter cool thanks! I got the sub-route routing working with the changes to the MySubRoute/index.js but still scratching my head getting the subroutes component "props" set.

I have the same dir layout (/modules /containers/ /modules index.js) inside the sub-route directory (/src/routes/MyRoute/routes/MySubRoute/....) but I'm not seeing the props in the Component class being set, which I would have expected due to the call to connect in src/routes/MyRoute/routes/MySubRoute/containers/MySubRouteContainer.js.

mrweissx
@mrweissx_twitter
@csjohn connect() has been pretty robust for me, double check you are calling connect() correctly, and actually using the connected component, instead of the component itself
csjohn
@csjohn

@mrweissx_twitter I've been playing around with it a bit but can't seem to get the functionality I expect.

I'm using console.log(props, this.props) from the sub-routes component constructor (class defined component) but am seeing only empty objects. The sub-routes index.js is basically the same as the demo and other (with the exception that it's nested).

I've thrown console.logs throughout and have confirmed that the route logic is being called (like the call to connect() and I even see the reducer and state update in the Redux dev tools, I just can't seem to get the injection of the props into the sub-route component working in the same way the top level routes work.

csjohn
@csjohn
not the connected component
jakehm
@jakehm
I'm trying to implement firebase auth. When I hit the register button, the error reads "this.props.register(. . .).then is not a function
jakehm
@jakehm
but it's still registering new users even though errors pop up in the console
csjohn
@csjohn
@mrweissx_twitter thanks for getting back to me on that, you're totally right :) Importing the container (that has the export connect(... call was the proper thing to do.
csjohn
@csjohn
How are people generally going about setting initial redux state given the fractal pattern of the starter kit?
csjohn
@csjohn
Oh I think it's done within the "module" alongside the reducer definition
Tobias Lundgren
@lundgren2
Hi, I have an simple question. I’m using redux to store props with all my customers and now I only want to list all customers that have country = SE. How can I do this check in react/redux? and then list it in an <li> with .map() or something like that?
Roman Pearah
@neverfox
@lundgren2 Lots of ways you could handle that, but try setting the filter in state also (because that's what it is) and then write a selector for the customers your view sees that either returns all customers or customers filtered as appropriate.