0

Researching this online and not having much luck if anyone has done this before.

How would one get the content from the CMS to update the FE and also create new pages / modules as a normal CMS would allow you to do?

Little confused on this.

Filth
  • 153
  • 1
  • 5
  • 2
    It's not really clear what you are asking, or where React comes into it. Have you read the Craft templating docs https://craftcms.com/docs/templating/global-variables ? – Seth Warburton Oct 03 '17 at 11:47

3 Answers3

2

You could take a look at the Element API to help bridge the gap between your React front-end and your Craft back-end. That will at least help you with getting data out of Craft.

As far as creating new pages and modules you'd use Craft's Control Panel (CP). You're going to have to take a look at the Craft Documentation in particular Sections & Entries.

Steve Holland
  • 2,485
  • 1
  • 16
  • 31
  • There is also a GraphQL plugin for craft https://github.com/markhuot/craftql You could connect your react frontend with apollo – Simon Franzen Apr 02 '18 at 01:51
2

Piggy-backing off of the other answers here, using GraphQL via the CraphQL plugin is a really nice option, because you don't have to build your own ElementAPI via PHP. You just install the plugin, and away you go.

Check out the Using VueJS + GraphQL to make Practical Magic article and the GraphQL: Better than all the REST? podcast.

andrew.welch
  • 11,551
  • 22
  • 31
1

Unlike Element API, the CraftQL plugin makes all CRUD calls available and straight forward. CraftQL

Adam
  • 31
  • 3