React app behind login page
-
Hi there!
First of all, thank you very much for this plugin. This is exactly what I’ve been looking for. I’m new to react dev in WP, so bare with me if this is a no-brainer.
So, I’ve successfully created and setup a react app on a fresh WP install using WPlocal and following your guide. Everything words very nicely and smooth there.
However I want to use ReactPress to develop af more dynamic dashboard page on my existing WordPress site. The site is a members only site and the dashboard would sit behind an existing login page (created in WP). I cannot get this to work. This is what I’m doing:- I create the react app as shown in the guide for a local version of my membership site (hosted using Local)
- I navigate to the folder and run yarn start
- I go to localhost:3000 and I’m immediately redirected to the existing WP member login page. Url is still localhost:3000
- I enter my login details, but I get an error saying cookies needs to be activated for wordpress to work
- When the error happens the login page is automatically reloaded, but now the domain is the one set i Local, not localhost:3000 (something like my-domain.local)
- Now the login works, but when I land on the dashboard page (my-domain.local/dashboard) where the react app should be running, nothing is showing.
Now if I do a manual build (yarn build) of the app, then I can navigate to my-domain.local/dashboard and see the react app, but I don’t want to develop having to do a build each time I need to see the changes I’ve made.
Do you have any idea what I can do here?The page I need help with: [log in to see the link]
- The topic ‘React app behind login page’ is closed to new replies.