Skip to content

Commit

Permalink
Enable modern JSX runtime (#1)
Browse files Browse the repository at this point in the history
* Enable modern JSX runtime

* Upgrade to 4.1 stable
  • Loading branch information
billyjanitsch authored Nov 20, 2020
1 parent 0db9e5b commit a3c887c
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions fixtures/react.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react'
import {useState} from 'react'

interface FooProps {
num: number
Expand All @@ -7,7 +7,7 @@ interface FooProps {

export default function Foo(props: FooProps): JSX.Element {
const {num, str} = props
const [count] = React.useState(0)
const [count] = useState(0)
return (
<div>
{count}
Expand Down
68 changes: 34 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
"license": "Apache-2.0",
"prettier": "@kensho-technologies/prettier-config",
"peerDependencies": {
"typescript": "^4.0.0"
"typescript": "^4.1.0"
},
"devDependencies": {
"@kensho-technologies/prettier-config": "^1.0.0",
"@types/react": "^16.9.53",
"prettier": "^2.1.2",
"react": "^17.0.0"
"@types/react": "^16.14.0",
"prettier": "^2.2.0",
"react": "^17.0.1"
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"forceConsistentCasingInFileNames": true,
"incremental": true,
"isolatedModules": true,
"jsx": "react",
"jsx": "react-jsx",
"module": "esnext",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
Expand Down

0 comments on commit a3c887c

Please sign in to comment.