Skip to content

Commit 2a7712c

Browse files
committed
doc: fix example error.
1 parent 547da37 commit 2a7712c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ import JsonView from '@uiw/react-json-view';
3030
import { lightTheme } from '@uiw/react-json-view/light';
3131

3232
export default function Demo() {
33-
const [value, setValue] = useState([]);
33+
const [value, setValue] = useState();
3434
return (
3535
<React.Fragment>
3636
<XMLReader
3737
onFileLoaded={(data, iFileInfo, iOriginalFile, text) => {
3838
setValue(data);
3939
}}
4040
/>
41-
{value && value.length > 0 && (
41+
{value && (
4242
<JsonView
4343
keyName="data"
4444
value={value}

www/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ root.render(
3030
source={data.source}
3131
components={data.components}
3232
data={data.data}
33-
title="XML View for React"
33+
title="XML Reader for React"
3434
description="React component that handles xml file input and its parsing."
3535
version={`v${VERSION}`}
3636
>

0 commit comments

Comments
 (0)