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

Updated react to v18 #37

Merged
merged 1 commit into from
Nov 8, 2024
Merged

Updated react to v18 #37

merged 1 commit into from
Nov 8, 2024

Conversation

PsychoSanchez
Copy link
Owner

This pull request includes several updates to dependencies, improvements to React component typing, and updates to the React rendering method. The most important changes include updating dependencies in package.json, migrating to React 18, and improving type safety for React components.

Dependency Updates:

  • Updated various dependencies in package.json, including @storybook/react to ^8.4.2, @types/chrome to 0.0.280, and react and react-dom to 18.3.1. [1] [2]

Migration to React 18:

  • Updated the React rendering method in src/popup.index.tsx to use createRoot from react-dom/client instead of ReactDOM.render.

Type Safety Improvements:

  • Added explicit types to various function parameters and component props, such as direction: 1 | -1 in src/popup/components/WeekDatePicker.tsx.
  • Removed the React.FC type from several components to simplify typing and improve compatibility with React.PropsWithChildren. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Storybook Typing Fix:

  • Addressed a TypeScript error in src/shared/blocks/_stories/Panel.stories.tsx by adding // @ts-expect-error comment.

Callback Type Refinement:

  • Refined the type of the handleDateClick callback in src/shared/components/ActivityCalendar/index.tsx to ensure it matches the expected type for React.ComponentProps<'div'>['onClick'].

Copy link

@apitenko apitenko left a comment

Choose a reason for hiding this comment

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

I approb

@PsychoSanchez PsychoSanchez merged commit b3d0826 into main Nov 8, 2024
3 checks passed
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.

2 participants