Replies: 2 comments 3 replies
-
|
Did the config prop go away? If so, would the navigation stuff (component, and location) just be hand rolled rather than configured by the wrapper? Also, is there documentation on the props? (config, etc) I had something like this before: I am glad you are still working on this. Thank you for all your hard work! |
Beta Was this translation helpful? Give feedback.
-
|
Hello @coltanium13, thank you for using the library and giving feedback. I really appreciate it.
Yes, config prop is not a thing anymore. Thanks to the power of composition, you can place your Navigation anywhere in your code. Just pull the methods you need (next, prev, etc.) from
Steps only accepts In your current code, instead of passing config object, you can directly render them inside return statement. Just make sure that if you are using any property that exists in Here I quickly refactored the code you shared: const stepsConfig = useSteps();
return (
<>
<Steps>
{uniq(steps).map((step) => step)}
</Steps>
<StepNavigation
{...stepsConfig} // make sure renamed and removed properties are not used in StepNavigation component
isSaving={props.isSavingChanges}
validateForm={props.validateForm}
submitAccount={props.submitAccount}
addressWasUpdated={props.addressWasUpdated}
setAddressWasUpdated={props.setAddressWasUpdated}
/>
</>
);One last thing, make sure you wrap this component with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This version is a major upgrade that removes some parts of the library and introduces some breaking changes.
Stepcomponent is removed. Direct siblings ofStepscomponent will be treated as a new step.StepsProvidershould wrap the component that rendersStepscomponent. For example, ifStepscomponent is rendered inAppcomponent, andAppis rendered inindex.jsfile,<App/>should be wrapped withStepsProviderinindex.jsfile.next,prev,isFirst,isLastshould be accessed usinguseStepshook.For more details, please check the documentation.
This discussion was created from the release Version 3.
Beta Was this translation helpful? Give feedback.
All reactions