You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You will see the output of: "You are: example-store.myshopify.com"
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:
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
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 :)
The text was updated successfully, but these errors were encountered:
That is because as soon as you set SHOPIFY_FRONTEND_ENGINE to REACT you will no longer get the JWT/Session stuff in between the page views. As this removes AppBridge from the blade set up as it is no longer needed.
Just setting the engine to REACT is not enough to use an SPA out of the box. There is still set up required by you to load the react app into the view. As in your screenshot i don't see <div id="app"></div> for a start.
Closing as this is not a package issue but a set up issue on the react side. I might need to make the docs more clear on what this actually does.
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
Current behavior
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
This isn't firing because useNativeAppBridge is returning false when
SHOPIFY_FRONTEND_ENGINE
is set toREACT
. This makesuseNativeAppBridge()
return false.Any help or advice here would be greatly appreciated. Thanks :)
The text was updated successfully, but these errors were encountered: