logux / client

Logux base components to build web client
https://logux.org/
MIT License
656 stars 46 forks source link

Add auth store and wrappers for Vue and React #67

Closed euaaaio closed 3 years ago

ai commented 3 years ago

Would it be better to create Auth store?

let { userId, isAuthentificated } = useStore(Auth(useClient()))

With this store, useAuth became just a small wrapper:

function useAuth () {
  return useStore(Auth(useClient()))
}

and it will be easy to backport it to other frameworks.

euaaaio commented 3 years ago

Wow. It would be very consistent for Logux.

ai commented 3 years ago

LGTM. Will look closer and merge tomorrow.