Basic changes to get the proof of concept working. Lots of attention
was given to the store/reducer to solve existing problems with async
code and stale closures, it seems even today how to handle this with
use reducer is not quiet settle, I guess because once an app reaches
a certain level of maturity everyone grabs an off the shelf solution
to state management. I ended up implementing thunks because they are
really rather simple. Interesting thread about it all here:
https://gist.github.com/astoilkov/013c513e33fe95fa8846348038d8fe42#gistcomment-3377800
I also move some of settings that were persisted in the openScad
controller into the data store as I ulimately thing what I was doing
in that file was very confusing, with the fact that it had to be
called multiple times with different information before it would be able
to render something properly.
I think this make it easier to swap between using the aws endpoint and
local endpoint but without having to worry about accidentally committing
the local endpoint if you absent mindedly staging everything, and it
still defaults to aws so it's easy setup for anyone doing a fresh clone.
add OPENSCAD_BASE_URL="http://localhost:8080" to you .env file.
You will have to restart yarn rw dev for the url to swap over though.
Resolves#242