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

Can I use Toast outside React Component ? #7575

Closed
Chuazz opened this issue Jan 7, 2025 · 3 comments
Closed

Can I use Toast outside React Component ? #7575

Chuazz opened this issue Jan 7, 2025 · 3 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@Chuazz
Copy link

Chuazz commented Jan 7, 2025

No description provided.

@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 7, 2025
@sja-cslab
Copy link
Contributor

sja-cslab commented Jan 7, 2025

That's not an Issue. If you've questions, please ask in Discord.

However - Taost is a React component to use within the react environment. What exactly do you mean then?

@melloware this should be closed

@Chuazz
Copy link
Author

Chuazz commented Jan 7, 2025

i just want to use Toast.show('....'), no need to define ref every time to use

@Chuazz Chuazz closed this as completed Jan 7, 2025
@sja-cslab
Copy link
Contributor

You could build a context so you would have a single toast component that you can import everywhere like const toast = useMyToastContext() however, just works within components

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants