Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Mahmoud Eskandari
@mahmoud-eskandari
when i try to npm install > 979 node_module installed
npm -v 4.5.0
node -v 4.2.2
Thank's for leading ...
emision
@emision
@mahmoud-eskandari Quote from README "Make sure that you have Node.js v6 or newer and Yarn installed on your development machine."
Mahmoud Eskandari
@mahmoud-eskandari
@emision Thank you guy!!! Node 6
Justin Chang
@Jchang4
Hey guys, is there a way to define SCSS colors and fonts as global variables I can use throughout my components?
Ross Lemenille
@rossthedevigner
I'm trying to track down where there chunks: someName is used or referenced within the webpack build like here: https://github.com/kriasoft/react-static-boilerplate/blob/master/src/routes.json#L5
how does webpack know to use that chunk name?
Jai
@Jaikant
Hey, I am new to RSB. Any readme on how to initialize the redux store.
Joe Reed
@joerobot
Just posted this: kriasoft/react-static-boilerplate#227 but just found this gitter room, so might be more appropriate place to ask for help
Is there a way of implementing routing with hashes (or something?) so that you can link straight to a specific page? Nav'ing straight to localhost:3000/about works fine, but once deployed mysite.com/about 404s, presumably because it can't hit the js. Help would be greatly appreciated :)
Vladimir Kutepov
@frenzzy
@joerobot your web server should return index.html for any path
Moujib Bouchech
@moujibbouchech
Goodmorning, i want to redirect the user from the login page to the Home , i'm using cognito to connect , i then get a token , i need to pass that token probably via the router to the home page , can anyone help me ??
jejay
@jejay
Hello I am new to webpack and react. I don't understand the dynamic class-name generation witch ´import cx from 'classname'´. The npm-info-page does not help either. Can someone hint me something to read?
jejay
@jejay
I think I got it
Vladimir Kutepov
@frenzzy
className="one two"
var x = 'one', y = 'two', z;
className={x + ' ' + y + ' ' + z}
// => className="one two undefined"
className={cx(x, y, z)}
// => className="one two"
marchis bogdan
@marchisbogdan
Hey Guys... I have a problem with the page rendering after I login i'm redirected to a "Lobby" page and from there I want to navigate to another page called "Entries"... but when I push to the history the desired pathname (e.g /entries)... it starts the actions specified in the componentWillMount() (where I start the action of retrieving some data from the API) ... and by using redux-logger I can see how the state changes but the page redirects automatically to the lobby page.... got any ideea why?
Ross Lemenille
@rossthedevigner
Is there a RegEx way in the routes.jsonto prevent more than one sub-directory from being browsed to?
for example; example.com/sub1/sub2 if the user browses to /sub2 it should throw a 404
but /sub1/ is still a valid route. my route looks like: "path": "/:country"
Konstantin Tarkus
@koistya
@/all hey guys! I'm doing a major upgrade to React Static Boilerplate, integrating create-react-app and Relay Modern. Is anyone willing to collaborate on this?
Konstantin Tarkus
@koistya
@/all just have pushed create-react-app and Relay Modern integration onto the master branch, will commit a few improvements/fixes later on this week. Your opinion is welcome!
Konstantin Tarkus
@koistya
Just have updated the home page to fetch the list of stories from a GraphQL API backend, see src/Home, src/Story and src/router.js
Gadigg
@Gadigg
Hi :) I Keep getting CORS cross origin errors when using fetch api to get a json from another url.. any suggestions?
Konstantin Tarkus
@koistya
@Gadigg hey, your other API service must allow cross origin requests for http://localhost:3000 URL origin (the one one which you're running the app)
Konstantin Tarkus
@koistya
Hey guys! What do you think about replacing CSS Modules with Glamorous?
kriasoft/react-static-boilerplate#246
Konstantin Tarkus
@koistya
Alternatively, Styled Components kriasoft/react-static-boilerplate#247
Konstantin Tarkus
@koistya
@/all just have merged Styled Components integration into the master branch as it seems to be a mainstream solution
samf56
@samf56
Hi! Thanks for making this available for everyone! What's the easiest way to get started if my project does not require GraphQL or Relay? I am deploying a simple static website, but would still like to use the integration of React and Routing. Thanks!
Konstantin Tarkus
@koistya

@samf56 you can reuse the existing setup, just replace query: ... field in your routes, with something like this:

{
  path: '/posts/:id',
  fetch: () => ({
    post: fetch('/api/posts/${id}'),
  });
  component: () => import(/* webpackChunkName: post */ './Post'),
  render({ data }, Post) => {
    return { title: data.post.title, component: <Post post={data.post} /> };
  });
}

And update src/router to pre-fetch data for the routes without Relay
Also, you can remove QueryRenderer from the App component and tweak it a little

samf56
@samf56
Thanks! One more thing: the 404 page seems to be broken in the current version: https://rsb.kriasoft.com/hello
Dan Van Brunt
@iDVB
Anyone else getting certificate has expired from the clean react-static-boilerplate when running yarn relay? This JUST started happening to me today. Been working fine over the weekend. Seems like some kinda node/npm issue?
@koistya you ever see this issue? Can't seem to google our way out
Dan Van Brunt
@iDVB
Just realized that the error has something to do with the ./setup.js step where it downloading the schema from https://graphql-demo.kriasoft.com/schema
perhaps is your cert expired there?
Seems like it when I visit that url in a browser.
Dan Van Brunt
@iDVB
Would love some help removing the default Relay/GQL calls from the boilerplate. Seems like whatever I do some error will yell about another thing depending on them. I just want to use this as a codebase but currently do not have any external call requirements
I got it close...... no errors, but the home route just sticks at Loading.... Can't see to find out why the proper route's body never gets placed in
Konstantin Tarkus
@koistya
@iDVB thanks for reporting this one, I have fixed the issue with SSL/HTTPS
Dan Van Brunt
@iDVB
@koistya nw. not sure what an alternative would be… but having this codebase that reliant on your demo domain seems like it might not be worth it. Maybe another hosted public graphql service?
Konstantin Tarkus
@koistya
@iDVB, it should be pretty easy to strip it off, I will create a PR/instruction
Dan Van Brunt
@iDVB
@koistya I think you are right…. I got a bit lost in errors trying to do this whilst that cert issue was going down too. :P
Konstantin Tarkus
@koistya
@iDVB also, if you're using a RESTful API backend, you can use the same approach of fetching data inside the routing logic, you could describe data requirements in the routes { path: '/posts/:id', fetch: { post: 'GET /api/posts/$id' }, ... }
or completely remove data fetching from routes
Dan Van Brunt
@iDVB
actyually, at the moment we’re trying to move to serverless for all our sites. Some MUCH smaller then others and basically have no API needs at all. For those, we we’re looking for a boilerplate that would have an easy path to enhance later when it does need one.
Konstantin Tarkus
@koistya
create-react-app is the best for that use case, IMO. and react-static-boilerplate is just a project template bases on create-react-app but having more stuff configured - Prettier integrated into ESLint, code formatting on save in VS Code, VS Code code snippets, etc.
Dan Van Brunt
@iDVB
@koistya yup, thanks! Already moved over to create-react-app brought over some of your boilerplate niceties (new for us) that we now can’t live without. prettier, and styled-components
Konstantin Tarkus
@koistya
Looking for small help :) kriasoft/react-firebase-starter#272