Yes, React can be used with WordPress, as in the example above, where the content on the front-end built with React is managed by WordPress CMS using the WP Rest API.
Q. Can WordPress be used as a headless CMS?
WordPress is the most flexible CMS that allows you to create almost any type of website. Its open-source nature means that you can use WordPress as a headless CMS.
Q. Is Headless WordPress more secure?
Yes, to some extent, headless WordPress makes your website more secure as hackers cannot access your backend.