#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    93
    Rep Power
    5

    WP + React JS - Overkill?


    Is React JS overkill for Wordpress Theme development?
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Caro, Michigan
    Posts
    14,814
    Rep Power
    4536
    Yes.

    I have no idea what those words mean, though.
    -- Cigars, whiskey and wild, wild women. --
  4. #3
  5. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,327
    Rep Power
    2063
    I'd go so far as to say...

    Maybe. Maybe not.

    As with everything else, it's all about how you use the tools and what your desired outcome is. If you want something that properly utlises React, then go for it.

    I would add though, WordPress is (arguably) a decent CMS but it's not quite so good yet as acting like an API. The REST API is going some way towards this, but it is still pretty inefficient at doing what it does. If you're just using it as a headless API script, there's better solutions out there.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    93
    Rep Power
    5
    Originally Posted by Catacaustic
    I'd go so far as to say...

    Maybe. Maybe not.

    As with everything else, it's all about how you use the tools and what your desired outcome is. If you want something that properly utlises React, then go for it.

    I would add though, WordPress is (arguably) a decent CMS but it's not quite so good yet as acting like an API. The REST API is going some way towards this, but it is still pretty inefficient at doing what it does. If you're just using it as a headless API script, there's better solutions out there.

    I would like to use React JS to reuse HTML components. For example, instead of having to manually code a 'card' (bootstrap 4 term), I would simply pass data to a function that would generate the card dynamically.

    For Wordpress (WooCommerce), I would only be using it for the front-end templates (where the majority are static pages).
  8. #5
  9. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,327
    Rep Power
    2063
    Originally Posted by ide
    I would like to use React JS to reuse HTML components. For example, instead of having to manually code a 'card' (bootstrap 4 term), I would simply pass data to a function that would generate the card dynamically.

    For Wordpress (WooCommerce), I would only be using it for the front-end templates (where the majority are static pages).
    WordPress already has a pretty robust templating system built in, so why duplicate that functionality with something else? Also consider that doing things though JavaScript has a very high chance that they won't be picked up by a lot of search engines, so any SEO benefit that you'd get from having that done in pure HTML sent from the server.

    Again, why complicate things by adding on another JavaScript package and adding extra processing time, download time and complexity, just to emulate something that you can do server-side now?
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    93
    Rep Power
    5
    Originally Posted by Catacaustic
    WordPress already has a pretty robust templating system built in, so why duplicate that functionality with something else? Also consider that doing things though JavaScript has a very high chance that they won't be picked up by a lot of search engines, so any SEO benefit that you'd get from having that done in pure HTML sent from the server.

    Again, why complicate things by adding on another JavaScript package and adding extra processing time, download time and complexity, just to emulate something that you can do server-side now?
    Make sense, make sense. So an HTML templating system (like twig, pug or even smarty) be a better choice (speed up theme development...) then use PHP to write custom functions that generate custom components (like a card, etc...)?
  12. #7
  13. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,327
    Rep Power
    2063
    Originally Posted by ide
    Make sense, make sense. So an HTML templating system (like twig, pug or even smarty) be a better choice (speed up theme development...) then use PHP to write custom functions that generate custom components (like a card, etc...)?
    WordPress uses standard PHP files, so it makes it even easier than adding in additional templating system on top of what's there. For re-use, there's functions available from WordPress core and WooCommerce that let you do that already.

    The big reason behind this is that WordPress can be slow, especially when you're running WooCommerce (known from experience here). The more you can leave out, the faster it will go.

    Comments on this post

    • ide agrees

IMN logo majestic logo threadwatch logo seochat tools logo