ReactJS + Headless Drupal: Step by Step

Поделиться
HTML-код
  • Опубликовано: 5 янв 2025

Комментарии • 13

  • @kaifahmad4131
    @kaifahmad4131 2 года назад

    Great content. Just what I was looking for.🤩😍

  • @UmairAliUGINTL
    @UmairAliUGINTL 3 года назад

    There is a drupal 8 distribution. I want to use it, but it should be a react web app. Can you give me some idea on how I can convert it into a react web app?

  • @DheerSinghDel
    @DheerSinghDel 3 года назад

    I want to save Like and Share information on my article in Drupal using API(userid ,nodeid ,nodetype). I am using a custom reactjs UI. Can u advise?there is aplugin AddtoAny for share but can't find how to do api post for shares made through it in Drupal.

  • @himanshulahare7378
    @himanshulahare7378 2 года назад

    I'm using d8 + react, using exposed controller, I have is_user_logged_in : "true" in routing, can access from postman, it is automatically attaching the sess cookie token in header. But axios is not setting any cookie so getting 403, with cred is everywhere and cors is also fine.

    • @devlasutriv
      @devlasutriv 2 года назад

      Were you able to figure this out?

    • @himanshulahare7378
      @himanshulahare7378 2 года назад +1

      @@devlasutriv yep for cookie based auth I had to add set cookie in I think setting.php.

    • @devlasutriv
      @devlasutriv 2 года назад

      @@himanshulahare7378 Thanks! Took me multiple days but I actually had a CORS issue where the browser was automatically removing the Set-Cookie header thus not allowing the new session cookie to be stored. I got around it by the common "withCredentials/credentials: 'include'" while also using a local proxy server (lcp-react-proxy) with custom origin/credential settings.
      Took a very long time but and I'll probably be writing a post about it in the future so people can get more clear documentation with React+D9 when D9 is hosted remotely and you're developing locally with a common browser.

    • @himanshulahare7378
      @himanshulahare7378 2 года назад +1

      @@devlasutriv For me cors issue was handled by services.yaml. A detailed documentation would have saved a lot of time researching and debugging. I think headless drupal is great tool but it lacks documentation and tutorials.

    • @devlasutriv
      @devlasutriv 2 года назад +1

      @@himanshulahare7378 Yeah I had tried enabling/modifying the cors settings in services.yml but failed to get it to do anything (rather odd it seems). Instead I had to do a lot of header modification in my apache config at /etc/apache.conf. I agree and I think that headless Drupal is a fantastic approach over Drupal by itself but it lacks in docs and tuts at the moment for it to take off.

  • @EdwinVegaMoreno
    @EdwinVegaMoreno 6 лет назад +6

    This is the best guide by far that I have seen in all the web and for free. I wanna thank you Drupal 4 Gov for publish this Step by Step because was a great help me for me.
    A lot of thanks.

  • @chrisp21990
    @chrisp21990 5 лет назад

    What is the method to use crud actions when we are not logged into drupal portal?

    • @Drupal4Govnp
      @Drupal4Govnp  5 лет назад

      you can reach out to the speaker at SpinSpire, Jitesh's info is on the first slide.