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
Add redux examples #65
Conversation
yes... sigh. it's a core-js bug, zloirock/core-js#262 / zloirock/core-js#267. see babel issue: babel/babel#4783 i don't have a good answer for this right now |
(i mean, the pr i have up on core-js, sorta, but i'm not sure it's correct) |
Ah, cool. Not a problem. When you get a chance can you look over the examples and make sure they're idiomatic for |
Sorry – I've been a little swamped this week. I haven't forgotten about this PR, I just haven't had a chance to look more closely yet. |
@taion Not a problem at all. I know you're busy, don't worry about. |
babel/babel#5195 would also fix the problem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it took so long for me to get to these. These look great!
A couple of other comments. Could you:
- Add these to the list of examples in https://github.com/4Catalyzer/found/blob/master/README.md#examples
- Add a stub README to the examples, especially for the universal one (see https://github.com/4Catalyzer/found/tree/master/examples/universal and https://github.com/4Catalyzer/found/tree/master/examples/basic)
<body> | ||
<div id="root">${ReactDOMServer.renderToString(element)}</div> | ||
<script> | ||
window.__PRELOADED_STATE__ = ${JSON.stringify(state)}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xss vulnerability here
], | ||
}, | ||
]; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extraneous newline?
App.propTypes = propTypes; | ||
|
||
export default App; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extraneous newline?
@@ -0,0 +1,54 @@ | |||
import React from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think it'd make sense to put everything here, for this example specifically? it's how i have it in the others... i think it'd still be short enough to be readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah not a problem.
@@ -0,0 +1,19 @@ | |||
{ | |||
"name": "connected-redux", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would just call this "redux"
@@ -0,0 +1,23 @@ | |||
{ | |||
"name": "universal-connected-redux", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would just call this "universal redux"
@ekosz BTW the Babel issue got fixed in babel 6.23. |
@taion Awesome. I'll update these examples after work today |
Well, as soon as babel-runtime 6.23 gets published, anyway. |
@taion Updated the examples. Unfortunately even after updates all of the dependencies I'm still getting that error. It looks like |
babel-runtime 6.23.x actually hasn't been released yet... that's the package that needs the update, sorry |
This looks great though. I'll merge once Babel updates. |
Oops, got sidetracked. Thanks again! |
@taion Not a problem. Glad I could give back in a small way. |
This is almost done, but I've gotten stuck on an error with the universal version. The server renders the page correctly, but then the front-end errors out with:
It seems to be a problem with
getStoreRenderArgs
. @taion have you seen an error like that in the past?