Site logo

[Support request] single page application

Home Forums Support [Support request] single page application

Home Forums Support single page application

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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 wordpress

    Thanks

    #1849439
    Elvin
    Staff
    Customer Support

    Hi 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. 😀

    #1849722
    david

    Hi Elvin, Thanks for clarifying. I assume trying to integrate it with wordpress just adds another level of complexity to an already complex process.

    #1850677
    david

    After much Googling came across WPGatsby / WPGraphQL seems like this might be the the way to go.
    Any thoughts?

    #1851108
    David
    Staff
    Customer Support

    Hi 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.

    #1851195
    david

    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

    #1852179
    David
    Staff
    Customer Support

    Information 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.

    #1854373
    david

    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.

    #1854376
    David
    Staff
    Customer Support

    Sounds like a good solution !

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.