Skip to content
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

realworld submission #59

Open
purpledawn777 opened this issue Mar 11, 2018 · 7 comments
Open

realworld submission #59

purpledawn777 opened this issue Mar 11, 2018 · 7 comments

Comments

@purpledawn777
Copy link

purpledawn777 commented Mar 11, 2018

Referring to issue #57 (which I am not allowed to comment on) it would be great to see a realworld submission for S/Surpplus (https://github.com/gothinkster/realworld , https://github.com/gothinkster/realworld/issues) : This is useful to compare frameworks and
it would more clearly communicate the strengths & caveats of the S/Surplus paradigm ~ quantitatively for example in lines of code, etc, but also so one can make a real qualitative comparison, and would make a great tutorial/starter kit on a potential reactive architecture:
namely, how to handle nested routing, dynamically loaded modules and tree shaking module bundles ; server side render (Razzle?) and client hydrating; fractal state (Freactal pattern with S?), etc.
ie, a prescriptive starter kit showing how to make real use of S/surplus that one can clone with degit and get to work with!

@adamhaile
Copy link
Owner

That's not a bad idea. I just finished a small app, one that's about the size of the realworld demo. I may just port over the patterns I'm using there. I'll take a look at what other's have done.

@adamhaile
Copy link
Owner

Also, dunno why you couldn't comment on #57? No special rights on it that I'm aware of. If that's still the case let me know.

@purpledawn777
Copy link
Author

Great, Looking forward to it!
re 57, This was my first github post ever (just for this request!), so maybe I wasn't fully authenticated yet..

@adamhaile
Copy link
Owner

I did a realworld implementation using surplus. You can try it out at https://github.com/adamhaile/surplus-realworld .

I still need to add some tests to submit to the main realworld site.

@purpledawn777
Copy link
Author

purpledawn777 commented Apr 16, 2018 via email

@purpledawn777
Copy link
Author

purpledawn777 commented May 2, 2018

Starting to look at this, looks great, and learning a few tricks!
One bug I encountered though: starting out logged out, if I click on functionality needing authentication [eg add to favorites], I get redirected to the sign-in page (great) but then clicking on any of the links (eg register, or conduit/home) doesn't work / keeps me on the sign-in page.
On the other hand, if I explicitly go to the sign-in page directly from the home page, the links (register, etc) do work correctly.
It seems like once being redirected to the sign-in page via authMonitor.authenticate(), you stay in that mode, always redirecting to the login page until logged in.

@adamhaile
Copy link
Owner

Yeah, that's a good point. I moved the handling of authentication into the AppContainer component, thinking that that way the individual pages wouldn't need to deal with it, but that has the result that once one page has requested login, they all get stuck in that mode. I'll refactor that. Thanks for taking a look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants