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

Switch to a root level action init() function #2

Open
jdh2550 opened this issue Mar 15, 2018 · 0 comments
Open

Switch to a root level action init() function #2

jdh2550 opened this issue Mar 15, 2018 · 0 comments

Comments

@jdh2550
Copy link
Owner

jdh2550 commented Mar 15, 2018

Todo & user are initialized via oncreate (which doesn't work reliably - I don't know why). Even if I could get that working properly I think this is better:

https://zaceno.github.io/hypercraft/post/initialization/

Note that for secure calls do something like this:

  init: () => (state, actions) => {
    actions.user.init().then((result)=>{
      if (result.success) {
        actions.todos.init()
      }
    })
    location.subscribe(actions.location)
  }

Or better still add some sort of "authenticatedInit()" convention?

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

1 participant