andywer / andywer/use-inline-memo
Question: Can this library be used to memoize components inline?
- Langage dominant
- TypeScript
- Étoiles
- 164
- Forks
- 3
- Merge moyen
- 17 h 56 min
- PR mergées (30 j)
- 2
Description
Heya, nice project!
Just wanted to check if and how this library can be used to memoize components inline, e.g.:
```typescript
const Row = memo((props) => {
const { isLoadingRowAction, rowId } = props;
const thisLoadingRowAction = isLoadingRowAction === rowId;
return (
<>
{memo.circularFadeIn(
,
[thisLoadingRowAction]
)}
);
});
```
It appears that the component is one render behind, e.g. the CircularProgress doesn't fade in until the render **after** thisLoadingRowAction is `true` (even if it is false on the next render).
Any advice or guidance would be appreciated :)
Edit: Just did some logging:


Appears `in` is `true` in the second log but not in the first?
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.