question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Instance Prop Documentation

See original GitHub issue

Hi Jason,

Thank you very much for this fantastic project. I want to control my wizard from outside the StepWizard component, and I’m not quite sure how to achieve it using the instance prop. Is there any advanced example of it, that I could look into?

Thank you very much, Timo

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
bunditcommented, Dec 15, 2021

@highdox This is how I got it to work with mine:

function Wizard({ children }) {
    const [wizard, setWizard] = useState<StepWizardProps>()

    return (
        <ReactStepWizard instance={setWizard} className="h-full w-full">
            {children}
        </ReactStepWizard>
    )
}
0reactions
abdelavcommented, Apr 20, 2022

@sajjadjm possible workaround is to merge both types and use them

import StepWizard, { StepWizardProps, StepWizardChildProps } from 'react-step-wizard';

type SWProps = StepWizardProps & StepWizardChildProps;

......

 const [ wizard, setWizard ] = useState<SWProps>();

 const setInstance = (sw: StepWizardProps): void => {
    const swProps = sw as SWProps;
    setWizard(swProps);
 };
 
 ....
 
 <Button onClick={wizard?.nextStep}>NEXT<Button>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Instance Property — properties 0.5.4 documentation
Property for instances of a specified class. Instance Properties may be used for any type, but they gain additional power with HasProperties types....
Read more >
AWS::EC2::Instance - AWS CloudFormation
Specifies an EC2 instance. ... Type: AWS::EC2::Instance Properties: AdditionalInfo: String Affinity: String AvailabilityZone: String BlockDeviceMappings: ...
Read more >
Documenting components - React Styleguidist
Styleguidist generates documentation for your components based on the comments in your source code, propTypes declarations, and Readme files.
Read more >
Typechecking With PropTypes - React
For performance reasons, propTypes is only checked in development mode. PropTypes. Here is an example documenting the different validators provided: import ...
Read more >
Update instance properties - Compute Engine - Google Cloud
Instance update requests through the gcloud CLI or the Compute Engine API do not support PATCH semantics. · You can update only a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found