While practicing React I wanted to take it further by showing complete post only if the post id == 2.
I wanted to do with substring but didn't work, then I added toString() but still not working.
<p> {postId == 2 ? post.body : post.body.toString().substring(2, 3) } </p>
Here is a complete example, just uncomment the commented line https://codesandbox.io/s/useeffect-practice-fetch-gskpf?file=/src/index.js