When should I use the JavaScript guide versus the React guide?
When should I use the JavaScript guide versus the React guide?
JavaScript: Use
DictationClient from @suki-sdk/dictation and call await dictationClient.show({ ... }) when the user should dictate. Walk through Dictation SDK JavaScript integration.React: Use DictationProvider and Dictation from @suki-sdk/dictation-react, with the same DictationClient instance passed into the provider. Walk through Dictation SDK React integration.Pick the guide that matches your stack. The Quickstart shows both patterns in one place if you want a shorter comparison.Why should I use one DictationClient per page or shell?
Why should I use one DictationClient per page or shell?
The documentation treats
SukiAuthManager and DictationClient as long-lived for a page or session. If you create a new DictationClient on every render or for every textarea, the iframe and session tend to tear down and start again, which feels unstable.That guidance is spelled out in the Quickstart (recommended integration pattern) and in the best-practices sections of the JavaScript and React integration guides.How do I switch dictation from one field to another in JavaScript?
How do I switch dictation from one field to another in JavaScript?
Call
show() again with the next field’s options. A new show() call replaces the active session. You do not need to call hide() manually just to move from one field to another for that pattern.See JavaScript integration and Configuration for examples and option details.How do I switch fields in React?
How do I switch fields in React?
Keep a single
client and DictationProvider. Use state (for example activeFieldId or a boolean) so only one Dictation is mounted at a time, or change fieldId / initialText when you remount. You do not need to call hide() yourself for that kind of switch.Full pattern: React integration.What happens when the React Dictation component unmounts?
What happens when the React Dictation component unmounts?
When
Dictation unmounts, the SDK automatically calls hide(). For normal React flows you do not call hide() yourself.Details: React integration.