Skip to content

feat(mui-stash-receiver): add stash receiver package#914

Open
btrinhav wants to merge 2 commits into
mainfrom
feat/stash-receiver
Open

feat(mui-stash-receiver): add stash receiver package#914
btrinhav wants to merge 2 commits into
mainfrom
feat/stash-receiver

Conversation

@btrinhav
Copy link
Copy Markdown
Contributor

Provides StashReceiver context provider and useStashContext hook for fetching session data from the Stash API.

Provides StashReceiver context provider and useStashContext hook
for fetching session data from the Stash API.
const [loading, setLoading] = useState(true);
const [error, setError] = useState<string | undefined>(undefined);

useEffect(() => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could all be converted to a useQuery hook from react-query. It handles all of this state for you. We have an @availity/hooks package that I would add it to instead because there really isn't anything MUI specific with this package. We should also use the API resource that will be created in sdk-js instead of using axios directly

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Preview deployed!

📖 View Storybook Preview

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

Successfully merging this pull request may close these issues.

3 participants