Skip to content

A very simple boilerplate to render data from Kentico Cloud to both the server and the client, using React components

License

Notifications You must be signed in to change notification settings

MMTDigital/kentico-cloud-universal-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kentico Cloud React Starter

Whut?

It's looking like we could be using headless CMS systems in teh future... Kentico offer their own headless CMS (and it seems really good!). This repo is my first attempt at rendering simple content from an API endpoint using React.

Note: Currently, this is client-side only! The next step would be to SSR this baby, which is totally do-able using this environment. I just don't have time right now to sort it. Feel free to chip in if you do

We're now rendering server-side first :)

How to run

  • Install latest node
  • Pull the repo
  • npm i
  • npm start
  • Head to localhost:8080

How to configure

  • Head to https://kenticocloud.com
  • Sign up for a free trial
  • Once you're set up, and logged into your Kentico Cloud site, click the Kentico logo in the top left hand corner and click "Development"
  • Copy the "Project ID"
  • Replace the Project ID in src/config/endpoints.json with yours:
"content": "https://deliver.kenticocloud.com/your-project-id-here/items"

You should now see some data on localhost:3000. If you don't, here is what might have happened:

  • You pasted the Project ID wrong
  • Kentico have changed their base project and the fields have changed. Try inspecting the data
  • React doesn't like a field. Check the console.
  • Slack me @js

TODO:

  • Render the content on the server, first
  • Look into the various content-specific endpoints Kentico provides
  • Look at hooking up a view model, for easier data management
  • Add nodemon

Resources

About

A very simple boilerplate to render data from Kentico Cloud to both the server and the client, using React components

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •