Skip to content

Commit 14b6ad9

Browse files
committed
readme
1 parent 91f16c3 commit 14b6ad9

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,16 +317,20 @@ export default function YourComponent() {
317317
};
318318
```
319319

320-
If you're using Babel, please make sure include '@babel/preset-react' in devDeps and presets in .babelrc.js:
320+
#### Use Contracts Provider Babel/TSC config
321+
322+
If you're using Babel, please make sure include `'@babel/preset-react'` in devDeps and presets in `.babelrc.js`:
321323

322324
```js
323325
presets: [
324-
'@babel/typescript',
325-
'@babel/env',
326-
'@babel/preset-react',
327-
]
326+
'@babel/typescript',
327+
'@babel/env',
328+
'@babel/preset-react',
329+
]
328330
```
329331

332+
For `tsc`, you should set the `jsx` option to `'react'` in your `tsconfig.json`.
333+
330334
#### Use Contracts Hooks Usage
331335

332336
Once enabled, you can get contracts very simply:

packages/ts-codegen/README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,16 +317,20 @@ export default function YourComponent() {
317317
};
318318
```
319319

320-
If you're using Babel, please make sure include '@babel/preset-react' in devDeps and presets in .babelrc.js:
320+
#### Use Contracts Provider Babel/TSC config
321+
322+
If you're using Babel, please make sure include `'@babel/preset-react'` in devDeps and presets in `.babelrc.js`:
321323

322324
```js
323325
presets: [
324-
'@babel/typescript',
325-
'@babel/env',
326-
'@babel/preset-react',
327-
]
326+
'@babel/typescript',
327+
'@babel/env',
328+
'@babel/preset-react',
329+
]
328330
```
329331

332+
For `tsc`, you should set the `jsx` option to `'react'` in your `tsconfig.json`.
333+
330334
#### Use Contracts Hooks Usage
331335

332336
Once enabled, you can get contracts very simply:

0 commit comments

Comments
 (0)