đź“•
WP SandBox
  • CMS SandBox
  • Introduction
    • What are frameworks?
    • What is a Content Management System (CMS)?
    • Framework vs Library — differences in web development
      • Library vs Framework
  • CMS or Frameworks?
  • How to Choose The Best CMS Platform
  • How To Install a WordPress Theme
  • Pages in WordPress: How to Create and Add a Page
  • What are the User Roles in WordPress?
  • How to add jQuery?
  • How to Use & Work with jQuery UI in Wordpress
  • React JS
    • What exactly is React?
    • React JS— Architecture
    • The Flux Architectural Pattern
  • React Context API
    • React Props/State
      • React 16.8
      • What is Context API?
Powered by GitBook
On this page

Was this helpful?

  1. React JS

What exactly is React?

If you’re in the world of tech (or even if you’re not,) you might have heard rumblings about “React,” a specific way to write web applications, that over the past few years has picked up major steam.

But what is React? And why is it so popular?

Q: What is React?

A: Here’s the simplest way to put it: React is a way to keep the data of your application in sync with the user interface.

Q: And what is React in the sense that it’s a framework versus JavaScript which is a language?

A: React is technically considered a library. The difference is in a framework, it’s pretty much driving the majority of the time and just dips into your code from time to time. But in a library, your code is driving for the most part and you’re just kind of dipping into the library from time to time. Also, React is fully dependent on JavaScript, it only really runs on the latest and greatest flavor of JavaScript: es6 and es7.

Q: Why is react useful?

A: There’s a great deal of manual plumbing that developers have to write as you change the data, like maybe you’ll add a new post to your blog, or change the title of it. You have to also remember to go into the DOM in the browser and change where it is on the screen, and if you have the same thing in five different places on the screen, you have to remember to go and change them all. Then, if you miss one of those things, it just seems flakey. So React makes it really easy because it does all that for you.

Q: Can you explain what the specific elements of React JS are?

A: In web apps there’s an architecture called the model, the new and the controller. The model is your data, the view is actually what you see on the screen, the controller is supposedly the code that acts as the middleman between those two. React just takes care of the view. You still have to do all the stuff where you make your data and get your data from the server. You have to write the code to give that data to React, but the React fully takes control of making sure the screen is up to date with the data

Q: Why is React important?

A: From a technical perspective, it just makes it a lot easier. You don’t have to manually keep track of where all these things are. You can build separate components of your application. Maybe one person builds a component and another builds a different component, they can play nicely without those two people having to really communicate. And from an industry perspective, it’s the biggest language out there in terms of acceleration of how many people are adopting it. It’s made by Facebook, so they’ve got a lot of industry weight behind it. There’s not a big change that it’s going to disappear tomorrow or get abandoned.

Q: Where is it being used primarily?

A: Facebook is definitely the biggest company using it. And Sabio of course.

Q: How is React designed and maintained by engineers at Facebook?

A: Well, I know it’s an open source project, so not only do they contribute to it internally, but the development is public, so third parties could send in pull requests to get features.And then the React ecosystem is actually not just one project, it’s a whole bunch of little projects like React and then one called Redux. While they go hand in hand, they’re actually separate projects. The opposite would be a product you buy from a company and get some hidden source code that you’re allowed to use. It’s public open source.

Q: How does tell me about React Native and its relation to both iOS and Android mobile devices?

A: So when React first came out, it was just for the web browser. So it was going to be Chrome, or Firefox, or Edge on the desktop, or even Chrome on your phone, but you’re not going to get an actual native app that can do all the things that a native app can do. But one of the problems with native apps is you have your Android and your iOS and they are completely different worlds. So a company that wanted to do a good native app would actually have to hire two separate teams just because the skill sets are so different. React Native lets you write one set of code that works on both iOS and Android.

A: What type of jobs can I expect to get knowing React?

Q: Front end app developer. Interestingly, when I found React, I was just doing internal tools and I didn’t want to have to spend all that time doing those things like keeping the UI in sync. So I thought, “I’ll do React,” and it made it easier for me as a non-UI developer to just get something up that works consistently without having to really spend full time nitpicking the UI.

PreviousHow to Use & Work with jQuery UI in WordpressNextReact JS— Architecture

Last updated 3 years ago

Was this helpful?