He proposed it:
... and stirred waves of enthusiasm, of unveiled skepticism and never-ending debates. What would using React JS for Drupal's administrative UIs mean for you?
You, the site builder. You, the content creator?
And this is precisely what we'll try to answer in this blog post as we'll be:
- pointing our Drupal's long way to becoming “ JS ready”
- highlighting the reasons why React's most likely to win this “popularity contest” over other JS technologies
- highlighting the challenges to expect and to plan out for (to overcome) if React is, indeed, the “chosen one”
While headless Drupal 8 has proven to be a powerful content repository for front-end apps, not having a JS framework integrated into its very core has been the cause of certain … limitations:
- it kept putting off addressing well-known editorial and site-building UX issues
From Improving Its Web Services APIs to Being Ready for Integrating a JS Framework in Core
You're closer than ever, as a site builder/content creator, to using React JS for Drupal's administrative UIs. Yet, this didn't happen overnight:
- first Dries Buytaert (Drupal CMS's founder himself) and his team decided to stabilize Drupal's web services APIs
- then to step up their efforts even more for improving them
- and it's just now that they've decided that Drupal's finally matured and 100% ready for this major integration
Meanwhile, Drupal users have done wonders leveraging Drupal 8's web services APIs:
- front-end apps have been built alongside Drupal, which has been backing them up as their content repository
And, implicitly, it's time for the Drupal community, as well, to commit to a unique framework that will be used for its administrative front-end.
Why React JS?
We'll start by answering the “Why React JS over Angular or Ember?” question:
“Because of its component-based nature.”
And there's a growing “trend” among web developers to create user interfaces by putting together reusable component libraries. Luckily, React makes it easy to build self-contained components and to simply “assemble” them in big-sized apps.
Therefore, the other 2 JS frameworks (focused on MV* specific workflows instead), are off the table.
And now, let's list other reasons for using React JS for Drupal's administrate UIs:
- it's backed up and constantly updated with new libraries, new tutorials etc. by a worldwide, active community of developers
- it powers large-scale web projects such as Facebook, Airbnb, WordPress, The New York Times
- it's this community itself that bundled up an ecosystem of no less than 16.000 libraries around it
- its different approach to virtual DOM (Document Object Model): it “detects” precisely those virtual DOM objects that need to be updated and it's strictly those parts of the real DOM that it updates (instead of updating the entire DOM tree); a major performance boost indeed
- it poses no problems working with it thanks to its rather straightforward programming approach
- it “plays well” with all the other JS frameworks
- licensing issues reported in the past have been resolved
Expected Challenges of Working With React JS
For there are challenges that the Drupal's main contributors are planning out for when it comes to using React JS for Drupal's core. And so should you:
- modularity, itself, will turn out to be a major challenge to plan out for
- Drupal will need to “keep up with” React's much more alert release cycle
- Drupal theming for decoupled UIs will never be the same again: React's approach will prevail
Using React JS for Drupal's Administrative Interfaces: What's in It for You?
For adopting a JS framework for Drupal's own administrative UIs (and React seems to be the winning “competitor), does translate into key benefits for you, as well:
- whether you're a Drupal site builder or a content creator, using Drupal will get much easier (talking about addressing its old UX issues right?) in a reversible, incremental way
- building modern UIs will get a lot more streamlined when you have a modern, JS toolbox right at hand... in Drupal core!
- ... that, your future React-focused sills will be future-proofed (thanks to this JS technology's high popularity among web developers)
And what about using React JS for Drupal? Would you have gone for another JS technology instead if you could have chosen the one to power your administrative UIs from now on?