I have laravel backend application running on port 8000. It uses fortify and sanctum package for api and all routes are available for SPA.
I have a demo application in next.js which is connecting and working fine with backend part. I am following these examples from github for laravel and next.js https://github.com/ggelashvili/laravel-fortify-spa-backend
But next.js is not what I want to use in the end but REACT. So how could I make this work with react?
How can i access the csrf token, login controller of fortify and api data?
I tried to copy all files from https://github.com/ggelashvili/laravel-fortify-spa-frontend to my react app but it shows this error.
TypeError: Cannot set property 'props' of undefined
Once I fetch the data, how can I pass it in a different component with props?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…