Design comparison
SolutionDesign
Solution retrospective
I spent a lot of time on input structure. Also I learn how to pass function from child element to parent element by using useRef() and useImperativeHandle(), but I am unsure of my code. And I am not sure about setting card position.I don't know did I do it correctly.
Community feedback
- @sulemaan7070Posted almost 2 years ago
hey Hseinz😄, congratulations on completing the challenge!!💯💯 The only thing which is missing from your site is
the items on the card are not updating based on input-change
... since you have used thereact.js
here's how you can conditionally render the items on the card.const [cardNumber,setCardNumber]=useState(""); const [name,setName]=useState(""); <h2> {!cardNumber ? "0000 0000 0000 0000" : cardNumber} </h2> <p > {!name ? "Jane Appleseed" : name} </p>
Let me know if you need further help, Happy coding🔥🔥
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord