Win a copy of The Career Toolkit this week in the Jobs Discussion forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

React: Up & Running: recommended for only single page web apps?

 
Ranch Hand
Posts: 86
2
Python Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. React is a JavaScript framework, so is it useful for single page web application (or recommended for only single page web apps)?
2. Is react used to design web application which are accessible through mobile devices?
 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ReactJS is UI library, popularly termed as 'V' in MV* frameworks so can be used to render GUI on web apps. It is relatively new compared to other Javascript frameworks but widely adopted by Facebook internally (as well as Instagram, Netflix etc).
There is an entire ecosystem around React e.g. Flux (for persistence) etc.
It gives you a lot of freedom to choose your own M and C from traditional MVC pattern.
Trust that answers your both questions.
 
author
Posts: 85
5
PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bhushan Jawle, spot on!

1. ...or recommended for only single page web apps



React really shines when the data in the app changes often as a result of user actions, server events, passage of time... So building a static blog with React is probably overkill. But not necessarily. The comments section of a blog post is perfectly suitable React app. In fact the first ever React app is the section for comments/likes/etc underneath Facebook newsfeed posts. React was designed from day one to fit into existing apps/pages. You can replace a small section of a bigger page. You don't need to rebuild the whole app (from <html> to </html>) from scratch

2. Is react used to design web application which are accessible through mobile devices?



You can render a React app to DOM. Then style it with CSS however you want - for for big screens, small screens... up to you. React is agnostic of all this.

Then there's also React Native where you render a React app natively (no webviews) to Android or iPhone. Or Windows. Or Ubuntu.
 
Ranch Hand
Posts: 153
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I noted that one poster mentioned that "React is used by Facebook internally".

Question:

1.) Is React used in the actual Facebook website and/or the mobile app? Or somewhere else in "Facebook-land"
 
Stoyan Stefanov
author
Posts: 85
5
PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, it's used all over the place. Some webapps (Instagram) are entirely built on React - top to bottom. Others (say Facebook newsfeed) have different bits and pieces implemented as React apps. That's the beauty - you can replace one thing at a time, instead of stopping the world to rewrite your whole site.

As an experiment, go to Facebook's newsfeed and type in your console:



You'll see the little React apps in there, e.g. the top search bar is one app, the status update area is another and so on
 
Marshal
Posts: 67496
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Stoyan Stefanov wrote:That's the beauty - you can replace one thing at a time, instead of stopping the world to rewrite your whole site.


Interesting. I tried to do something like this when learning Angular 1 and quickly decided that it was pretty much impossible; you go all Angular all the time, or you just don't.

That's one of the things that intrigued me about jQuery way back when no one had even heard of it ("jQwerty? What's that?") -- the ability to dip your toes without the need for a full cannonball.
 
M Khalid
Ranch Hand
Posts: 86
2
Python Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bhushan

Thank you Stoyan Stefanov.

React.js is really cool and I'm looking forward to use this awesome library in future.
Cheers.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic