Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to react@18 #1398

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Update to react@18 #1398

wants to merge 4 commits into from

Conversation

theharryszn
Copy link

@theharryszn theharryszn commented Jul 23, 2022

  • Upgraded to react@18
  • Converted Carbon.js to function component to use react@18 hooks
  • Used useDeferedValue instead of debouncing in Carbon.js

Closes #1360
@mfix22

@vercel
Copy link

vercel bot commented Jul 23, 2022

@OpeAbidemi is attempting to deploy a commit to the Carbon Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@mfix22 mfix22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @OpeAbidemi! Just a few questions here and above

Did you confirm that automatic bracket ({}, (), [], …) completion still works correctly?

@@ -0,0 +1,487 @@
import React, { useMemo, useState, useDeferredValue } from 'react'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OpeAbidemi what is this extra file being used for?

@@ -49,14 +46,16 @@ function getUnderline(underline) {
return 'initial'
}

class Carbon extends React.PureComponent {
static defaultProps = {
const Carbon = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this component need to get converted to a functional component? If it isn't strictly required for upgrading to React@18, can we do these changes in a separate PR?

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.

Update to react@18
2 participants