WP REST API get all posts (or customs posts) for a React app

Firstly, the custom posts need to have the 'show_in_rest' => true, parameter set on post registration – see Adding REST API Support For Custom Content Types for more detailed instructions.

Secondly, I then usually navigate to yoursiteaddress.com/wp-json/ for example https://blog.ted.com/wp-json/ – there you’ll see a play-book for all the routes you can play with in your React app. Check your REST route exists as you think it should.

Thirdly, read the page that @kero mentioned above in the comments – Using the REST API – Pagination. This will, combined, tell you the full route you’d want to use along with the parameters that you’d want to be applying.

For example your first request URL might look something like this
/wp/v2/custom_post?per_page=10&status=publish

Your second page
/wp/v2/custom_post?per_page=10&status=publish&page=2

…and so on.