Skip to content

Commit fe0bc20

Browse files
committed
update readme
1 parent 967bd70 commit fe0bc20

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

README.md

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,10 @@
1-
# React + TypeScript + Vite
1+
# Basic web-viewer React example
22

3-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3+
Sample [Vite](https://vitejs.dev/) + `React` app which opens a web viewer pointing to an `.rrd` file.
44

5-
Currently, two official plugins are available:
5+
Includes a `react-select` element to showcase multi-rrd functionality.
66

7-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9-
10-
## Expanding the ESLint configuration
11-
12-
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13-
14-
- Configure the top-level `parserOptions` property like this:
15-
16-
```js
17-
parserOptions: {
18-
ecmaVersion: 'latest',
19-
sourceType: 'module',
20-
project: ['./tsconfig.json', './tsconfig.node.json'],
21-
tsconfigRootDir: __dirname,
22-
},
237
```
24-
25-
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
26-
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
27-
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
8+
$ npm i
9+
$ npm run dev
10+
```

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export default function App() {
1818
const [selected, setSelected] = React.useState([] as string[]);
1919
return (
2020
<div>
21-
<WebViewer rrd={selected} />
2221
<Select isMulti options={options} onChange={(e) => setSelected(e.map((v) => v.value))} />
22+
<WebViewer rrd={selected} />
2323
</div>
2424
);
2525
}

0 commit comments

Comments
 (0)