justinmoon / junction

UI For Using Hardware Wallets With Bitcoin Core
MIT License
60 stars 13 forks source link

Initial component layout, add Mobx and React Router #24

Closed wbobeirne closed 5 years ago

wbobeirne commented 5 years ago

What This Does

This does some initial frontend setup using reactstrap, mobx, and react router. This adds a navigation and some pages, as well as an initial layout of what the store would look like using Mobx.

I used Mobx in an attempt to reduce the boilerplate, but I think it added a nonzero amount of complexity. For starters, observables are a little tricky to use, and come with a bunch of caveats. I also had to hack around and create a custom connect function to get the typing to be strong (The maintainers of mobx suggest either making all types optional, or to start using React hooks. Neither of those options seemed appealing.)

At this point I could go either way. We could either swap it out with Redux, remove all extra state management, try yet another state management, or just dig in with Mobx.

Steps to Test

Screenshots

Screen Shot 2019-09-08 at 7 16 17 PM