Skip to content

React SPA - Can't get the latest version to work using Laravel 8 or Laravel 9Β #30

@ncpope

Description

@ncpope

I have gone through the installation steps a number of times on fresh installations of Laravel and I'm unable to get the React (or vue) SPA to load.

Steps to reproduce

screenshot-logged-in

Current behavior

  • Set the react settings (by the way there is a typo in the wiki docs where "react" should be "REACT" according to the enum (in .env set SHOPIFY_FRONTEND_ENGINE="REACT") Line 245 Utils.php
  • You will see the following:

screenshot

Feedback

  • Are we supposed to get the current logged in user using the same Laravel Auth::user() function?

  • It appears that this is breaking the app bridge from loading due to there not being a user logged in - views/layouts/default.blade.php

@if(\Osiset\ShopifyApp\Util::getShopifyConfig('appbridge_enabled') && \Osiset\ShopifyApp\Util::useNativeAppBridge())

This isn't firing because useNativeAppBridge is returning false when SHOPIFY_FRONTEND_ENGINE is set to REACT. This makes useNativeAppBridge() return false.

Any help or advice here would be greatly appreciated. Thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingunconfirmedBug has not been reproduced yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions