provider-wizard-and-options
[wizzard] WizardProvider was given a wizard and also flow, data. The wizard was already built withits own options, so any passed beside it are ignored. Pass the options to createWizard and only wizard tothe provider, or drop wizard and let the provider build one.…/errors/provider-wizard-and-optionsThrown as a WizardError with op: 'WizardProvider' by @wizzard-packages/react, on any
render where both are set, in development and production builds alike. The message lists every
option that was passed with a value; a prop set to undefined does not count, and neither does
a prop that is not an option, such as data-* or ref forwarded by a wrapper.
WizardProvider gets its wizard one of two ways. Given wizard, it uses that engine as it is, and
that engine was configured when createWizard built it. Given options instead - flow,
registry, data and the rest - it builds and owns one. Both at once has no meaning: the options
could not reach an engine that already exists, and before this check they were dropped without a
word, so a data prop that seemed to seed the form did nothing.
Pick one. Either move the options into createWizard:
const wizard = createWizard({ flow: signup, registry, data: { plan: 'pro' } });
<WizardProvider wizard={wizard}> <SignupForm /></WizardProvider>;or drop wizard and let the provider build the engine:
<WizardProvider flow={signup} registry={registry} data={{ plan: 'pro' }}> <SignupForm /></WizardProvider>The Vue binding has no form of this mistake: provideWizard takes a single argument, a wizard or
the options, never both.