#Alert component
1 messages · Page 1 of 1 (latest)
best way is to have root component wrap all content in a HOC https://yew.rs/docs/advanced-topics/struct-components/hoc
you would have a callback that opens alert, and stuff it into the context (you can make a custom struct to contain it)
your hoc would have a contextprovider<the struct i mentioned> that gives everyone that callback, take in children as prop, and just put those children inside contextprovider
There are several cases where Struct components do not directly support a feature (ex. Suspense) or require a lot of boilerplate code to use the features (ex. Context).