You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React version is currently at 16.14.0. We need to upgrade this to the latest React release (18.2.0) Benefits from the upgrade
React18 introduced automatic batching. This means that React now batches state updates made within components. This prevents the component from being rerendered inadvertently.
If you change the state of a component in React 16 twice, the component is rerendered twice. In React18, the two state updates are batched, meaning the component renders only once. This greatly improves the performance of our app which heavily relies on state updates for UI changes.
React18 has more APIs that we can use to further enhance the performance of Graph Explorer. Some of these include:
useTransition: Allows us to prioritize state updates. This will help with the slight delay in the textboxes used on Graph Explorer.
useInsertionEffect: This hook works like the useEffect hook, but it fires synchronously before all DOM mutations. It will address performance issues associated with injecting styles during render with CSS-in-JS.
useDeferredValue: We can use this instead of React.lazy to defer rendering some parts of the component tree (components that a user does not first see when they load Graph Explorer) e.g History tab, Resources tab, Modify Permissions tab etc.
The text was updated successfully, but these errors were encountered:
React version is currently at 16.14.0. We need to upgrade this to the latest React release (18.2.0)
Benefits from the upgrade
React18 introduced automatic batching. This means that React now batches state updates made within components. This prevents the component from being rerendered inadvertently.
If you change the state of a component in React 16 twice, the component is rerendered twice. In React18, the two state updates are batched, meaning the component renders only once. This greatly improves the performance of our app which heavily relies on state updates for UI changes.
React18 has more APIs that we can use to further enhance the performance of Graph Explorer. Some of these include:
The text was updated successfully, but these errors were encountered: