-
-
Notifications
You must be signed in to change notification settings - Fork 633
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
Fixes to avoid yak shave with redux_store #470
Conversation
0cd0e82
to
dc60515
Compare
@jbhatab, @thewoolleyman @martyphee Any opinions? |
We had a major yak shave when figuring out why setting up the store from a content_for block caused majore issues. The following doc changes and enhanced error messages will save others from this pain. Added a few checks for sane values when calling registerStore.
dc60515
to
a7f600a
Compare
@jbhatab, @thewoolleyman @martyphee Glanced at it, more docs and better messages seem good, but... ...FYI, I'm out of the loop and not doing much with React on Rails directly (although we are definitely still using it on Tracker, and plan on using it more to move towards a more mono-repo architecture for our now-separate-repo node apps, the patterns and conventions it establishes are great for that). On my personal projects, I've backed up and am focusing on learning Elm as an alternative to Redux+React (actually learning the fundamentals of Haskell first, so I'm strong in the FP fundamentals before diving into Elm). Not to disparage React-on-Rails, as I said, the "conventions" of structure, webpack configs, etc, are great and very much in the spirit of rails. I'm more backing up and seeing the flaws of JS/ES6 as a language, because I've seen the value of strong typing in Elm, which makes many errors like this impossible (e.g. an undefined parameter, which I believe is exactly the bug at the root of this issue). Tracker as a team I believe is also coming to this general position on Elm. I'd love to see "react-on-rails" perhaps evolve into something that gives all the mentioned benefits of convention and "just works" webpack configs, but while allowing the use of Elm as an alternative to React+Redux. Once I learn more (which is slow going for me) I'll perhaps try to help with this. Anyway, just a heads up on why I've gone mostly dark, sorry to put it on this random issue, but you mentioned me so wanted to be transparent. Glad to post this in a more general place if you think it's of wider interest. Thanks, |
node_package/src/StoreRegistry.js, line 10 [r2] (raw file):
what's this store generator thing about? Comments from Reviewable |
node_package/src/StoreRegistry.js, line 10 [r2] (raw file):
|
Reviewed 1 of 3 files at r1, 4 of 4 files at r2. Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. node_package/src/StoreRegistry.js, line 10 [r2] (raw file):
|
LGTM. We're not using redux anywhere and probably won't so I haven't seen anything like this. |
We had a major yak shave when figuring out why setting up the store from
a content_for block caused majore issues.
The following doc changes and enhanced error messages will save others
from this pain.
This change is