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

fix(toast): 🐛 useToast is not a function #151

Merged
merged 4 commits into from
Nov 17, 2020
Merged

Conversation

navin-moorthy
Copy link
Collaborator

@navin-moorthy navin-moorthy commented Nov 16, 2020

closes #145

@netlify
Copy link

netlify bot commented Nov 16, 2020

Deploy preview for renderless-components ready!

Built with commit 797aefa

https://deploy-preview-151--renderless-components.netlify.app

@navin-moorthy
Copy link
Collaborator Author

The new beta release with Toast fix works well - https://codesandbox.io/s/77pgz?file=/src/App.jsx

@navin-moorthy
Copy link
Collaborator Author

As doubted,

export const [ToastContextProvider, useToast] = createContext<IToastContext>({
  name: "useToast",
  errorMessage:
    "",
  strict: true,
});

Exporting a function in an array return doesn't build properly.

@navin-moorthy navin-moorthy merged commit bf476e2 into master Nov 17, 2020
@navin-moorthy navin-moorthy deleted the toast-hook-fix branch November 17, 2020 06:28
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.

Fix useToast is not a function
2 participants