Fireship · @fireship
React in 100 Seconds
Uploaded September 8, 2020 · Length 2:08
Summary
react basics: building user interfaces with react, props, state, and hooks in 100 seconds.
- react
- javascript
- ui library
- jsx
- state management
- hooks
- front-end development
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
react a javascript library for building
- 0:02
user interfaces developed at facebook
- 0:04
and released in 2013 it's safe to say
- 0:06
react has been the most influential ui
- 0:08
library of recent memory we use it to
- 0:10
build components that represent logical
- 0:12
reusable parts of the ui the beauty of
- 0:15
react is that the simplicity of building
- 0:17
a component has been brought down to its
- 0:18
theoretical minimum it's just a
- 0:20
javascript function it's so easy a
- 0:22
caveman could do it the return value
- 0:24
from this function is your html or ui
- 0:27
which is written in a special syntax
- 0:29
called jsx allowing you to easily
- 0:31
combine javascript with html markup if
- 0:33
you want to pass data into a component
- 0:35
you simply pass it a props argument
- 0:37
which you can then reference inside the
- 0:38
function body or in the ui using braces
- 0:41
if the value changes react will react to
- 0:43
update the ui if we want to give our
- 0:45
component its own internal state we can
- 0:47
use the state hook the hook is just a
- 0:49
function that returns a value as well as
- 0:51
a function to change the value in this
- 0:53
case count is our reactive state and
- 0:56
setcount will change the state when used
- 0:58
in the template the count will always
- 0:59
show the most recent value then we can
- 1:01
bind set count to a button click event
- 1:03
so the user can change the state react
- 1:05
provides a variety of other built-in
- 1:06
hooks to handle common use cases but the
- 1:09
main reason you might want to use react
- 1:10
is not the library itself but the
- 1:12
massive ecosystem that surrounds it
- 1:14
react itself doesn't care about routing
- 1:16
state management animation or anything
- 1:17
like that instead it lets those concerns
- 1:19
evolve naturally within the open source
- 1:21
community no matter what you're trying
- 1:22
to do there's very likely a good
- 1:24
supporting library to help you get it
- 1:26
done need a static site you have gatsby
- 1:28
need server side rendering you have next
- 1:30
for animation you have spring for forums
- 1:32
you have formic state management you've
- 1:33
got redux mobx flux recoil x state and
- 1:36
more you have an endless supply of
- 1:37
choices to get things done the way you
- 1:39
like it as an added bonus once you have
- 1:41
reactdown you can easily jump into react
- 1:43
native and start building mobile apps
- 1:45
and it's no surprise that knowing this
- 1:46
little ui library is one of the most
- 1:48
in-demand skills for front-end
- 1:49
developers today this has been react in
- 1:51
100 seconds if you want to see more
- 1:53
short videos like this make sure to like
- 1:55
and subscribe and check out more
- 1:56
advanced react content on fire ship i o
- 1:58
and if you're curious how i make these
- 1:59
videos make sure to check out my new


