-
Notifications
You must be signed in to change notification settings - Fork 31
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
no function or associated item named global
found for struct yewdux::Dispatch
#73
Comments
Global context is disabled for non-wasm targets. If you don't need SSR support, you can set the default build target for your project. If you do need SSR support, please review the docs |
We ran into the same issue even with targeting |
@accorded-jay that feature is for internal use, and shouldn't be necessary. Can you share your project, or a minimal reproduction? Using global in non-wasm targets can introduce unexpected behavior, and is not recommended. |
I have encountered the same issue while writing a very much WASM yew lil thing. |
@LucaCappelletti94 This might be happening when building the whole project, which probably defaults to your native target. You should be able to compile by specifying the target for your wasm crate only. However, I can see how this might get cumbersome. Will see about a qol improvement here |
I think it is a rust analyzer issue, which currently does not seem to support the config files for subcrates. |
Yes, trunk builds fine but rust analyzer complains. |
I write code with given example Default Value, an error occured
here is my code
here is the Cargo.toml
I want to know if I should turn on a certain feature?
The text was updated successfully, but these errors were encountered: