visortelle commented on PR #876:
URL: https://github.com/apache/pulsar-site/pull/876#issuecomment-2031741724
@lhotari if the parent component will be rendered for some reason, the
testimonial list will also be re-shuffled.
If you don't want to think about the parent component behavior, you can use
the `useMemo` hook with the `testimonials` dependency.
```tsx
import { useMemo } from 'react';
...
const shuffledTestimonials = useMemo(() => _.shuffle(testimonials),
[testimonials]);
...
{Object.values(shuffledTestimonials).flat().map((caseStudy, i) => (
....
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]