Skip to content

Conversation

@oshodic
Copy link

@oshodic oshodic commented Dec 18, 2023

I refactored the React-TS-Technical app for better state management and less renders. In TextInput.tsx I added the useDebouncedCallback library to delay the execution of the handleNameUpdate function in order to reduce unnecessary rendering. I also added the useCallback function for better functionality when handling text input changes.

I relocated the numOfFactors function from the ContentContainer to App.tsx. Also refactored the handleNameUpdate function to create a copy of the previous names state before setting it with the updated new name.

I've included my solution to the TypeScript Sandbox challenge within the tsSandboxSolution.ts file. Thank you so much for taking time to review my work and for the opportunity!

Here is my solution for the TS sandbox activity
Update state and relocate numOfFactors function to App.tsx. Refactor TextInput file
@oshodic oshodic self-assigned this Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant