- This topic has 8 replies, 3 voices, and was last updated 4 years, 8 months ago by
David.
-
AuthorPosts
-
July 8, 2021 at 12:55 pm #1849259
david
Hi, I’m interested in making a SPA application in WordPress, I’d like to make a gallery app and like the idea of just using the anchor tag (#) to change the image being displayed without reloading the page. The idea seems simple enough, but compared to building a normal WordPress site it seems to be a very complex process and I’m not sure it’s worth learning all this to make the browsing process a little more smooth/responsive.
So my question is, is this the only way to make a SPA app in WordPress? Maybe WordPress is not suitable for building single page applications?
Like to hear what you think, and if there’s an alternative way to do this within wordpressThanks
July 8, 2021 at 7:22 pm #1849439Elvin
StaffCustomer SupportHi David,
If you require a SPA-like behavior for your page, that’ll mean all the loading involves AJAX requests.
You’ll need a gallery plugin that sends AJAX requests on a click of a button to request a new image that replaces the current image.
This is complex and yeah AJAX is the only way to go since you have a specific requirement of not reloading the page. 😀
July 9, 2021 at 3:07 am #1849722david
Hi Elvin, Thanks for clarifying. I assume trying to integrate it with wordpress just adds another level of complexity to an already complex process.
July 10, 2021 at 2:28 am #1850677david
After much Googling came across WPGatsby / WPGraphQL seems like this might be the the way to go.
Any thoughts?July 10, 2021 at 9:28 am #1851108David
StaffCustomer SupportHi there,
Gatsby and GraphQL will allow you to create a SPA – but its not going to do the hardwork which is creating the React/JS Components for displaying your content – that would still be required and would require custom development.
July 10, 2021 at 11:43 am #1851195david
Thanks David,
I’m trying to get my head around React, I like the logic and feel this is the future for web development.
I’m familiar with the WordPress environment, and hopefully I can concentrate on coding in React without worrying if everything I need is in place.
I assume I can’t add WordPress pages or posts to this site. Can you suggest any good tutorials about developing with Gatsby within WordPress?
Is GeneratePress and GPpremium suitable for developing React apps in WordPress?Thanks
July 11, 2021 at 4:30 pm #1852179David
StaffCustomer SupportInformation direct from Gatsbyjs can be found here:
https://www.gatsbyjs.com/guides/wordpress/
Which contains a link to the WP + Gatsby Documentation. And should assist with the decision whether you should integrate with GP, there isn’t anything that GP does that would stop you from doing so.
Or alternatively take a look Freecodecamp i believe they have some tutorials on WP + React.
And if you want to learn React then check out the course by Wes Bos.
July 13, 2021 at 7:59 am #1854373david
Hi,
Making progress, think Frontity is what I’m looking for …till the next big thing.
For WordPress I’ll use the GP theme and for the Frontity SAP I’ll stick with their Mars theme – does that make sense?
Thanks for your time.July 13, 2021 at 8:00 am #1854376David
StaffCustomer SupportSounds like a good solution !
-
AuthorPosts
- You must be logged in to reply to this topic.