components icon indicating copy to clipboard operation
components copied to clipboard

feat(#664): update react to v17, and typescript to match

Open riiniii opened this issue 5 years ago • 1 comments

Fixes #664. -- currently blocked by npm run build which uses tsdx (tsdx uses typescript v3, and sends error when seeing that we used tsConfig.compilerOptions = 'react-jsx' which is a typescript 4 compatible option (react-jsx used over prev option to implement react 17 jsx-transform) Changes proposed in this pull request:

  • update react & react-dom to v17

  • update typescript to v4

  • ran codemod to remove + update React imports

  • update eslint to match react w/o import

  • tsconfig needs to be "react-jsx" instead of "react" now to support jsx transform

  • existing typescript errors TS2769: No overload matches this call. Overload 1 of 2, '(props: ReplaceProps<"symbol", BsPrefixProps<"symbol"> & ColProps> | Readonly<ReplaceProps<"symbol", BsPrefixProps<"symbol"> & ColProps>>): Col<...>', gave the following error. Type '"symbol" | "object" | "title" | "cite" | "data" | "form" | "label" | "pattern" | "span" | "summary" | "slot" | "style" | ComponentClass<any, any> | FunctionComponent<any> | ... 163 more ... | undefined' is not assignable to type '"symbol" | undefined'. Type '"object"' is not assignable to type '"symbol" | undefined'. Overload 2 of 2, '(props: ReplaceProps<"symbol", BsPrefixProps<"symbol"> & ColProps>, context: any): Col<"symbol">', gave the following error. Type '"symbol" | "object" | "title" | "cite" | "data" | "form" | "label" | "pattern" | "span" | "summary" | "slot" | "style" | ComponentClass<any, any> | FunctionComponent<any> | ... 163 more ... | undefined' is not assignable to type '"symbol" | undefined'. Type '"object"' is not assignable to type '"symbol" | undefined'. https://github.com/HospitalRun/hospitalrun/issues/363

causes build to fail, so change type to keyof JSX.IntrinsicElements, and typings match appropriately

Newly added dependencies with Bundlephobia links:

  • [Link of the new dependency]
  • [Link of the new dependency]
  • [etc]

Note: pull requests without proper descriptions may simply be closed without further discussion. We appreciate your contributions, but need to know what you are offering in clearly described format. Provide tests for all code that you add/modify. If you add/modify any components update the storybook. Thanks! (you can delete this text)

riiniii avatar Jan 15 '21 11:01 riiniii

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: tehKapa
:x: riiniii
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jan 30 '21 20:01 CLAassistant