I'm a software developer based in Newcastle Upon Tyne, England. I've got a wide range of experience in companies of varying sizes and cultures, and in roles of varying degrees of responsibility.
Slight update: After adding navigation into another application, which meant needing to add a navigation key, I've ended up re-evaluating this at the moment. Although all I've done is added any globally-available info to the model, and kept the state the way I described earlier:
And it's still the state that drives the UI itself:
-- VIEWview:Model->DocumentMsgviewmodel=casemodel.stateofLoading->{title="Some app",body=[loadingView]}ViewSignUpdata->letsignUpView=Html.map(\x->SignUpMsgx)<|SignUp.viewdatain{title="Sign up to Some app",body=[signUpView]}ViewLogindata->letloginView=Html.map(\x->LoginMsgx)<|Login.viewdatain{title="Log in to Some app",body=[loginView]}ViewPasswordResetdata->letforgottenPasswordView=Html.map(\x->PasswordResetMsgx)<|PasswordReset.viewdatain{title="Request a password reset",body=[forgottenPasswordView]}
I do like this better. Somehow it feels a little "forced" to make the model as one giant custom type. With this type of edit, you can still model your door/alarm states elegantly and completely with a big custom type, and get all the benefits of that. But other stuff in the model (like navigation key or login status) that doesn't have anything to do with the door state can live separately, as a different piece of the model record.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Slight update: After adding navigation into another application, which meant needing to add a navigation key, I've ended up re-evaluating this at the moment. Although all I've done is added any globally-available info to the
model
, and kept thestate
the way I described earlier:And it's still the
state
that drives the UI itself:I do like this better. Somehow it feels a little "forced" to make the model as one giant custom type. With this type of edit, you can still model your door/alarm states elegantly and completely with a big custom type, and get all the benefits of that. But other stuff in the model (like navigation key or login status) that doesn't have anything to do with the door state can live separately, as a different piece of the model record.