-
-
Notifications
You must be signed in to change notification settings - Fork 874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What are you struggling with? #59
Comments
Managing CSS is a little bit cumbersome. const styles = StyleSheet.create({
header: {
backgroundColor: 'red',
}
});
const Header = () => <div className={`m1 p2 ${css(styles.header)}`}>...</div> Also adding third party components with their own CSS is messy, I either add their CSS into my "global" css file or just write my own styles if possible. Besides CSS, I guess working with static assets like images also needs special solution to work in server side rendering so it could be improved as well. Thanks for the great work! |
Yeah Aphrodite biggest downfall is that can't compose / curry styles easily. Thus default styles are almost impossible. I have been using Pete Hunt's jsxstyle in a few projects recently. My main issue with it is that buttons are really really annoying to deal with. |
I'm having problems with CSS as well, I want to use scss and tried to install the isomorphic-style-loader that is mentioned in issue #60, but I can't get it to work, I get this error: "Warning: Failed Context Types: Required context The author of isomorphic-style-loader has an example project but his router is set up in some different way and I don't understand what I should do to make this work. Edit: Nevermind I've given up on this now |
How would you guys approach user authentication for this project? |
@developerwok Use |
@developerwok did that help? |
Hi Jared, I'm not getting 'redial'. It looks complicated and yet another abstraction layer. Would it be possible to make the data-fetching isomorphic simply by adding in the action creators something like:
Just asking I haven't completely understood how isomorphic data-fetching works. The other thing I'm not sure I understand is the async routes / async reducers part. What's the purpose of making that async? If we have SSR, the page will be shown immediately to the user, and while he figures out what to do the bundle.js can load in the background. So it seems to me that if SSR is enabled, it isn't so crucial to reduce the size of the js download, and the added complexity of async routes / reducers to split the code into chunks, is not worth it, especially for the kind of projects that would use a starter-kit to begin with. Feel free to correct me :) |
@misterfresh Async routes ensure bundle size minimization and js sandboxing. For example, if you have a protected but sync route, all of your app's js still gets bundled into your main js file. In contrast, if it's async, it get's chunked out and cannot be loaded without auth. This lets you scale out your app without ever worrying about bundle size or leaking sensitive logic to the client. I agree that this isn't a big deal for little apps, but if you have an app with ~20 routes (like we do on my team) it starts to become more important. |
I tried to make my routes and reducer async, and it almost works but I get the following error :
|
If you are struggling with redial, I suggest replacing it with more vanilla promise resolver. Github search for code with |
It would be great if you can add a stateful component page to the boilerplate, this will help people who have just start adpoting the new react concepts... |
I'm struggling with how awesome this boilerplate is. Prepare for takeoff. 😄 |
is there an easy way to access process.env variables from the client side ? |
@walshe you can put stuff in the |
ah great, thanks |
how can I temporarily ignore all the js lint warnings ? I tried adding a .eslintignore at the root with **/*.js nu made no difference |
Remove the standard loader from webpack config. |
can you be a bit more specific which part needs changing, I'm a newb to webpack module: { |
@lewis-elliott unfortunately, redial forces you to have "fat controllers." All SSR data fetching must be declared at the route component level. |
No it is. My mistake. I misunderstood your question. I thought you were talking about nested data fetching. You can checkout the react router 3 mega app demo. Basically, this uses the same technique, but this kit wraps the route declaration in a function if you need to inject reducers. |
i am trying to use css files but cant get it working..Installed css-loader, style-loader..
/Users/sathish/Desktop/Desktop/reactPro/node_modules/babel-core/lib/transformation/file/index.js:600 SyntaxError: /Users/sathish/Desktop/Desktop/reactPro/common/routes/Home/components/Home.css: Unexpected token (1:0)
I tried using this with no luck as it runs in dev but production build still causes issues.. |
No description provided.
The text was updated successfully, but these errors were encountered: