Skip to content

Commit

Permalink
chore: doc
Browse files Browse the repository at this point in the history
  • Loading branch information
savutsang committed Jan 22, 2024
1 parent 46781ed commit 3eb36fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/storybook/stories/table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1101,12 +1101,12 @@ interface OptimizationData {

/**
* The table will always update the table with the new data and columns when React is re-rendering this component.
* But the important key here is if you pass a different **columns** object, the Table will UNMOUNT and RE-MOUNT
* But the important key here is if you pass a different **columns** object, the table will UNMOUNT and RE-MOUNT
* every cell (instead of the usual React update). So it is very important to memoize the columns object (ex: using
* useMemo) and reuse it as much as possible.
*
* If your memoized columns need to be recreated because it has dependencies, you could pass these dependencies via
* useRef instead. This way you will always retrieve the current value of that variable.
* If you are recreting the memoized columns to update a dependency, you could pass these dependencies via useRef
* instead. This way you will always retrieve the current value of that variable.
*/
export const Optimization: Story = () => {
const [data, setData] = useState<OptimizationData[]>([
Expand Down

0 comments on commit 3eb36fe

Please sign in to comment.