Nodlik / react-pageflip

Simple React.js wrapper for StPageFlip library, for creating realistic and beautiful page turning effect
https://nodlik.github.io/react-pageflip/
MIT License
476 stars 91 forks source link

Each child in a list should have a unique "key" prop error with child components #36

Open seanbelverstone opened 2 years ago

seanbelverstone commented 2 years ago

Hi there,

I'm running into a small error message when using <HTMLFlipBook> containing custom <PageContent> components. When running in the browser, the error of Each child in a list should have a unique "key" prop error with child components but when trying to add a key to the custom components it doesn't seem to work properly.

Is there a better way to do this or am I missing something? I've had to use custom components to make each even/odd page a different format. I'll post a code screenshot below: Screenshot (45) Screenshot (44)

seanbelverstone commented 2 years ago

Note: i was manually adding keys into each PageContent component from inside the first screenshot, but it didn't count for whatever reason.