What would be the best approach for my React Resume Builder?

As you can see in the screenshot, I want my user to be able to add the education he had and experience, but let's say he has multiple fields of study/multiple jobs he worked at, I'd need some guidance to understand how I could build it, because each field would require to duplicate every item inside my useState, so basically if he worked at 2 jobs, how would I code it in a way so there are multiple "companyName, positionTitle, etc." ? Thank you!
No description
5 Replies
StarPlatinumSan
StarPlatinumSanOP4mo ago
for the frontend, I'm obviously thinking of adding a button that let's the user add a new field with all the infos to enter from the useState, but how would that translate in the backendish side with the useStates to duplicate the educationData/experienceData sections
missymae
missymae4mo ago
Instead of having a single "educationData" object, have an array of them, no?
StarPlatinumSan
StarPlatinumSanOP4mo ago
uhh how would I make an array of
const [experienceData, setExperienceData]
const [experienceData, setExperienceData]
?
missymae
missymae4mo ago
User adds experienceData, presses button to add a new field, useEffect to push the object to a "summary experience" array or whatever and reset the fields If the summary experience data needs to be reactive, it's another useState
StarPlatinumSan
StarPlatinumSanOP4mo ago
I'm taking notes, I'ma look up how useEffect works, thank you!
Want results from more Discord servers?
Add your server