The example code is here:
import Button from '@mui/material/Button';
import { memo } from 'react';
function PokemonBriefCard(props) {
return (
<div>Some random component</div>
);
}
export default memo(PokemonBriefCard);
// export default PokemonBriefCard;
The usage of that component is the following:
<div className="card-brief-container">
{
pokemonList.map((pokemon, index) =>
<div key={index}>
{PokemonBriefCard({
...pokemon,
action: pokemon.favourite ? removeFav : addFav
})}
</div>
)
}
</div>
It seems that if I put memo to the component, it would throw an error like this:
And once I remove the memo (like using the export default PokemonBriefCard instead), the project would render without an issue.
Am I using React.memo in the wrong way? I read through the introduction doc but can't find the cause of it.

PokemonBriefCard?