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

Proposal: Incrementally shift -site to React + Redux #54

Open
cmc333333 opened this issue Dec 14, 2016 · 4 comments
Open

Proposal: Incrementally shift -site to React + Redux #54

cmc333333 opened this issue Dec 14, 2016 · 4 comments

Comments

@cmc333333
Copy link
Member

As we've added new features (particularly Notice & Comment) which have required significant JS code, we've run into difficulties testing the frontend and following the logic between events. React should help the testing problem by providing very clean abstractions. Redux should make the eventing system easier to follow as it keeps track of the app's state in a single location.

We've also spoke a bit about isomorphic JS and how that could solve some of our split-brain backend-frontend issues. Getting these libraries in will make that direction easier to take, but let's keep the existing backend-generated HTML and focus only on the chunks of markup that are generated in JS. We can revisit once we prove the strategy's usefulness.

The incremental replacement approach is being using now in https://github.com/18F/calc and described in this talk: https://www.youtube.com/watch?v=BF58ZJ1ZQxY

Thanks to @jmcarp for suggesting this originally. What are your thoughts, @theresaanna @ascott1 @xtine?

@xtine
Copy link
Member

xtine commented Dec 14, 2016

I would agree to an incremental change while keeping templates, if CALC is shown successful in implementing that. I also really support trying out Redux especially as a lot of the custom event and state handling JS could probably be handled (and tested) better using it.

@cmc333333
Copy link
Member Author

Thanks @xtine!

@theresaanna
Copy link
Member

theresaanna commented Dec 19, 2016

I'm not familiar with the Notice & Comment work on a technical level, but knowing the foundation of the JS, modern tools/frameworks would help A LOT in reducing the complexity that must still be present. Word is that I'll be involved in an upcoming 18F eRegs engagement - I'm happy to look at incorporating some of this work into that as appropriate.

@ascott1
Copy link
Contributor

ascott1 commented Dec 19, 2016

👍 Though I don't see us tackling this work at CFPB in the near-term, I think it's a good and logical shift.

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

4 participants