skip to Main Content

Reactjs rerenders components and displays "Warning: Each child in a list should have a unique "key" prop."

I'm doing simple react blog app which renders simple posts list from https://jsonplaceholder.typicode.com/posts: //... function App() { const [posts, setPosts] = useState<IPost[]>([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); useEffect(() => { fetch(`https://jsonplaceholder.typicode.com/posts`) .then((response) => { if…

VIEW QUESTION
Back To Top
Search