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

Refactor codebase to use hooks and Vanellus instead of actions and HOCs #49

Open
adewes opened this issue Jan 4, 2022 · 0 comments
Open

Comments

@adewes
Copy link
Member

adewes commented Jan 4, 2022

Currently the app relies on higher-order components (HOCs) and custom actions to perform tasks. We want to change this so that the app just relies on hooks and the Vanellus functionality.

Currently there already are hooks that load the user, provider and mediator instances. So the user dashboard e.g. loads

// get the current user object
const user = useUser()

// load appointments
useEffect(() => {
    user.getAppointmentsById(...)
})

// display data from the user object
return <div>{user.secret}</div>
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