Can we move the next and prev button to the stepper only ? Will it be better instead of using it in each component and one more thing why this is requirement to keep it in the particular component does it useful in which way ? Can you share an example ?
hey prashanth instead of giving buttons in each component ,what if we give the prev and next buttons in the Section itself and update the currentStep ?
How can we handle state in it , should we create it in App component and pass it to step form component and pas the state to multistepper component oe should we use context for it what would be better aprroach ?
@@Learnersbucket but at the end if we want to send the request object to backend and that object needs to have data from all step form component then how we will handle it ? for eg first step form takes personal info second takes email and password then we click submit then how we will be able send reqobj which needs to have personal info as well as email and password if each component have it's local state ?
ok so either redux or context and update it whenever i click next and then while submiting we can send the central state in redux / context to backend am i right ? @@Learnersbucket
Can we use Context api instead of React.clone element?
No, cloning is better, as props are available without any further changes
We can also use map instead of for loop right..?
Yes
Can we move the next and prev button to the stepper only ? Will it be better instead of using it in each component and one more thing why this is requirement to keep it in the particular component does it useful in which way ? Can you share an example ?
It is component so that navigation can be done at component's will i.e after form validation or any other validation
Thanks.. please keep posting
Nice explanation 👍
Thanks 🙂
hey prashanth
instead of giving buttons in each component ,what if we give the prev and next buttons in the Section itself and update the currentStep ?
navigation at will, if all the validation for the given step is done then only navigate further.
It depends upon the requirement
How can we handle state in it , should we create it in App component and pass it to step form component and pas the state to multistepper component oe should we use context for it what would be better aprroach ?
Each component will have its own state
@@Learnersbucket but at the end if we want to send the request object to backend and that object needs to have data from all step form component then how we will handle it ? for eg first step form takes personal info second takes email and password then we click submit then how we will be able send reqobj which needs to have personal info as well as email and password if each component have it's local state ?
@@rishabhkunwar687 you use redux as central store
ok so either redux or context and update it whenever i click next and then while submiting we can send the central state in redux / context to backend am i right ?
@@Learnersbucket
@@rishabhkunwar687 yes
Gajab
Bhai tu toh government job karne bol rha tha uss din aaj machine coding ka video dekh rha h 😂
👍👍
Was asked the same question in CRED's FE interview xD
Many more to come, keep practicing
@@Learnersbucket Love your content