Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sune Radich Vestergaard 1 post 71 karma points
    Apr 05, 2019 @ 08:57
    Sune Radich Vestergaard
    0

    Using Umbraco Headless with React?

    First of all, bear with me. I am a frontend developer with very little techinical Umbraco knowledge. I've worked on frontends on 'regular' umbraco solutions, but have never myself configured or setup an umbraco site before.

    Basically what I want to understand is this: How can I use Umbraco Headless with a ReactJS application?

    I've found this page in the documentaion https://our.umbraco.com/documentation/Umbraco-Cloud/Headless/ it contains several ways to use Umbraco Headless with .Net, but only very little about Node.js/React. Also, the npm package mentioned seems outdated and incomplete, as it contains very little, and the code within have alot of //not implemented comments. On top of that, it contains no README, and was last updated a year ago.

    I have access to a Umbraco Headless instance, and if I request from /umbraco/rest/v1/content/published/ i will get quite a lot of data. Are there any documentation about what the data means, and how you are supposed to use it?

    Are there any best-practice to how you consume the data? How you manage the various components? How you map your react component with the right data from Umbraco?

    Or is the best practice to go with .Net and use Umbraco Headless that way?

  • saurabh 1 post 71 karma points
    1 week ago
    saurabh
    0

    Hi Sune , I have similar requirement to use React.js as a frontend app for Umbraco ,please let me know if you got any answer else where.Thanks.

  • John Bergman 424 posts 976 karma points
    1 week ago
    John Bergman
    0

    Are you needing a web api, or do you want to pull content (html) over into the react application?

  • Louis Jackson-Rees 94 posts 324 karma points c-trib
    1 week ago
    Louis Jackson-Rees
    0

    Umbraco Headless is still not fully released, hence why there is a lack of docs and updates to the NPM package.

    It also looks as though the Git repo for that NPM package no longer exists, so it might be worth waiting for Headless to fully launch later this year. Where i imagine there will be a new set of docs and node packages.

    You could also set up a traditional umbraco site and manually build the API controllers yourself however, this would need you to have a knowledge of c#.

    There is an existing Angular service which the umbraco backoffice uses to fetch content, maybe you could reverse engineer / wrapper this to achieve what you need.

  • Louis Jackson-Rees 94 posts 324 karma points c-trib
    1 week ago
    Louis Jackson-Rees
    0

    You may also want to look at this package from Matt Brailsford: https://github.com/mattbrailsford/umbraco-headrest#how-is-headrest-different-to-umbraco-headless

    He also summarises the differences between his package and umbraco headless.

    You may also be interested in the GraphQL package: https://github.com/rasmusjp/umbraco-graphql

Please Sign in or register to post replies

Write your reply to:

Draft