We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const [coffeeCount,setCoffeCount] = useState(0); <Counter start={coffeeCount} onChange={(newCount) => { console.log(coffeeCount.toString); console.log(newCount); setCoffeeCount(newCount); setInteractionMade(true); }} buttonStyle={styles.counterButton} buttonTextStyle={styles.counterButtonText} countTextStyle={styles.counterText} />
coffeeCount is state of Component. Stat props doesn't work, but start={3} works
The text was updated successfully, but these errors were encountered:
componentDidUpdate(prevProps) { if (prevProps.start !== this.props.start) { this.setState({ count: this.props.start }); } }
Please add this part and then fixed
Sorry, something went wrong.
If you satisfy, I hope you to hep my job seeking [email protected]
No branches or pull requests
const [coffeeCount,setCoffeCount] = useState(0);
<Counter
start={coffeeCount}
onChange={(newCount) => {
console.log(coffeeCount.toString);
console.log(newCount);
setCoffeeCount(newCount);
setInteractionMade(true);
}}
buttonStyle={styles.counterButton}
buttonTextStyle={styles.counterButtonText}
countTextStyle={styles.counterText}
/>
The text was updated successfully, but these errors were encountered: