• Maintained high-level expertise in React state management strategies. • Developed forms, models, Error boundary using React hooks. • Communicated with product managers and UX designers to translate project requirements and business objectives into polished user interfaces using React, JavaScript, HTML, CSS. • Designed REST calls using React to streamline user interface performance. • Improved and expanded project platforms using React to develop rich User Interfaces. • Integrated UI features complying with prescribed code standards and technical design guidelines. • Documented technical workflows and work done for the client and support team of the organization.
Nothing here yet.
Hello Jayesh, I would be happy to help you with that. Expensive operations are those operations that take longer time to execute such as complicated functions in component, API all with larger amount of data. setState can be an expensive function and we can avoid it by simply batching multiple states with single setState. we can also use useMemo() hook to decrease number of re-renders. Thanks Jayesh for your question, have a great day!!
Hello Anmol, I would be happy to help you with that. Yes, you are right. useRef() does not re-render the component but it is still preferable to use useState() hook because it keeps component up-to-date with latest state. Even if you need value of the inputs on submit of the form, I will suggest to use useState() hook because it provides a better control on each input value change and corresponding behavior of submit button. For example you can display error messages and disable submit button if user is entering wrong input value. I would like to suggest you Formik and Yup libraries for state management and validating form inputs in React. Thanks Anmol for your question, have a great day!!