We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
On this line in the docs we see following example:
import { createMachine } from 'xstate'; const buttonMachine = createMachine( { initial: 'idle', states: { idle: { on: { SUBMIT: 'busy' } }, busy: { invoke: { src: 'handleSubmit', onDone: 'success', onError: 'error' } }, success: {}, error: {} } }, { services: { handleSubmit: async (/* context, event */) {} } } ); export default class MyComponent extends Component { // ... @use statechart = useMachine(this, () => { const { doSomethingAsync } = this; return { machine: buttonMachine .withConfig({ services: { handleSubmit: doSomethingAsync } }) } // ... @action buttonClicked() { this.statechart.send('SUBMIT'); } };
Although it's just an example, I think it should be complete and import @use from somewhere.
@use
The text was updated successfully, but these errors were encountered:
On a second read ... isn't it the other way around? We don't need @use at all anymore and this one instance should be deleted?
Sorry, something went wrong.
docs: remove not needed usage of @use
2d33c5c
Fixes: LevelbossMike#395
Successfully merging a pull request may close this issue.
On this line in the docs we see following example:
Although it's just an example, I think it should be complete and import
@use
from somewhere.The text was updated successfully, but these errors were encountered: