mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-22 14:16:42 +08:00
### What problem does this PR solve? fix: Fetch chunk list by @tanstack/react-query #1306 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -0,0 +1,33 @@
|
||||
import { memo, useState } from 'react';
|
||||
|
||||
function compare(oldProps, newProps) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const Greeting = memo(function Greeting({ name }) {
|
||||
console.log('Greeting was rendered at', new Date().toLocaleTimeString());
|
||||
return (
|
||||
<h3>
|
||||
Hello{name && ', '}
|
||||
{name}!
|
||||
</h3>
|
||||
);
|
||||
}, compare);
|
||||
|
||||
export default function MyApp() {
|
||||
const [name, setName] = useState('');
|
||||
const [address, setAddress] = useState('');
|
||||
return (
|
||||
<>
|
||||
<label>
|
||||
Name{': '}
|
||||
<input value={name} onChange={(e) => setName(e.target.value)} />
|
||||
</label>
|
||||
<label>
|
||||
Address{': '}
|
||||
<input value={address} onChange={(e) => setAddress(e.target.value)} />
|
||||
</label>
|
||||
<Greeting name={name} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user