📺 Develpreneur YouTube Episode

Video + transcript

React Native Fundamentals Part 4

2021-10-05 •Youtube

Detailed Notes

In our third video on React Native: The Beginners Guide to React-Native Fundamental Concepts Part 2, continues our discussion of fundamental components. In addition to the design and layout concepts we covered last time, in this presentation we will be looking the most commonly used component, the text component.

Just in case you missed the last video you can find it here or you need a refresher you can find the first video Started Using React Native For Your Mobile Applications here.

Recap

React Native is an open-source mobile application framework brought to us by Facebook, Inc. We can use to develop applications for Android, Android TV, iOS, macOS, tvOS, Web, Windows and UWP by enabling developers to use React's framework along with native platform capabilities.

React-Native Fundamental Concepts Part 2 focuses on: Text Component

For a full list of components and APIs goto https://reactnative.dev/docs/accessibilityinfo

Text

A Text component in React Native is a component we use for displaying text. For example it supports nesting, styling, and touch handling. Furthermore is it probably one of the most widely useful components next to Views in React Native. In addition the text component also comes with the attribute numberOfLines,  that we can use to truncate the text with an ellipsis after computing the text layout, including line wrapping, such that the total number of lines does not exceed this number.

Nested text

Both Android and iOS allow you to display formatted text by annotating ranges of a string with specific formatting like bold or colored text. In practice, this is very tedious. In React Native, they decided to use a web paradigm for this where you can nest text to achieve the same effect.

Containers

The Text element is unique relative to layout: everything inside is no longer using the Flexbox layout but using text layout. This means that elements inside of a Text are no longer rectangles, but wrap when they see the end of the line.

Limited Style Inheritance

On the web, the usual way to set a font family and size for the entire document is to take advantage of inherited CSS properties like so:

html { font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 11px; color: #141823; }

In this example, all elements in the document will inherit this font unless they or one of their parents specifies a new rule. Because of this rule, React Native requires you must wrap all the text nodes inside of a Text component. However, React Native still supports the concept of style inheritance, but it only applies to text subtrees. While the new way is a bit more constrained way to styling text, it will however lead to better apps.

From a developers perspective:

React components are designed with strong isolation in mind. You can drop a component anywhere in your application, trusting that as long as the props are the same, it will look and behave the same way. Text properties that could inherit from outside of the props would break this isolation.

From an implementors perspective:

The implementation of React Native is also simplified. We do not need to have a fontFamily field on every single element, and we do not need to potentially traverse the tree up to the root every time we display a text node. The style inheritance is only inside of the native Text component and doesn't leak to other components or the system itself.

React-Native Fundamental Concepts Part 2 Additional Resources React is an open-source, front end, JavaScript library for building user interfaces or UI components. In addition, Facebook and a community of individual developers and companies help maintain it. React can be useful as a base in the development of single-page or mobile applications. Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on Chrome V8 engine and executes JavaScript code outside a web browser. Visual Studio Code is a free source-code editor made by Microsoft for Windows, Linux and macOS. In addition it includes support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. Android software development is the process by which applications are created for devices running the Android operating system. Xcode is Apple's integrated development environment for macOS and is used to develop software for macOS, iOS, iPadOS, watchOS, and tvOS.

Transcript Text
[Music]
now i've briefly kind of gone over the
nesting of our text here but what is
next
so
with android and ios
they both allow you to display formatted
text by annotation ranges of a string
with specific formattings like we showed
here with bold uh color and fonts
now in practice this can be very tedious
that way this is why react native
decided to use a web paradigm for this
where you can nest the text to achieve
the same effect
like we showed here
so let's look at another simple example
now
this one we will do
gray
all right so in this view tag here
let me show you a cleaner view
of using nested text
let's just create a text
and inside this let's just do another
text
and the parent
i am old
i am the child
i am red
all right so here we have two text tags
uh we have our outer our parent tag
which is going to have text i am the
parent i am bold
and then inside of our parent text tag
we also have a child text tag that is
going to display the text i am the child
i am red
and bold
now to make this work we now need to
apply some styles
so i'll come down
here and we will add
styling
so we'll add parent
page
text
and we will set the font weight
new bold
and then we will set the inner text
and we will set it to be the color
red
okay so far nothing has changed
we now have two new styles that we need
to apply so we'll take our parent base
text
and we'll come up here and we will add
our style to the parent
and since this is only one style we
don't need to add extra
swirlies or an array
we can just use styles
dot
parent-based text
when we save that we see that all of our
text is bold
now what we're also seeing over here
though is all of our text is one big
line of text that's because we have no
breaks in here
and you can do that in case you want to
actually
add bold
within this
you know a line of text and then
continue on doing some other text
so we can do i am bold and then add
another style here
styles dot or text
and you can see i am the parent i am
bold and i am the child i am red and
bold
so this is an interesting way of
creating a custom style tags in order to
bold italicize your text uh
midstream within your
applications
so after that we could actually then
continue adding more text
i am
after child
and bold
so behind the scenes react native
converts this
uh formatting
to a flat ns attributed string
uh
in ios and in android it's a spannable
string i'm right that's backwards
um so
behind the scenes great native is
converting this
text
uh to a flat ns attribute string tag
now on ios is converting this to a
spannable string
so it would read something like this
it would convert it and
inside of the expandable string it would
contain the text i am bold and red
then it would have an attribute for zero
to nine being bold or basically zero
position here give the position here
uh the attribute would be bold and then
it would say the next set of texts from
this position being say 9 to 17 would be
bold and red
all right so next let's talk about the
text tag as a container
so the text element is a unique relative
to layout
everything inside is no longer unique or
using a flex
box layout
but instead it's using a text layout
this means that elements inside of a
text tag are no longer rectangles but
wrap when they see the end of the line
so to see this example let's uh create
one more example here let's bring this
text down because the height can be a
little bit smaller for our example here
there we go
so let's create another
scroll view here
and in this one let's start with a text
it starts with capital
and again we'll do nested text
in the first part this will be first
part
and
then we have second part
right we save this
we see our even though we have nested
text tags
the text is all displayed on one line
first part and second part
let me also make this guy
white
reed
yellow
ah green
all right so now here the text container
the text will be inline if the space
allows it
the first part and the second part
otherwise the text will flow as if it
was one
the first part and second and the
third so if we actually shrunk this here
we actually make our width say
50.
you see it actually
stacks the text
so it only goes in line until it reaches
the end of the container and then it
wrapped
all right so next
do another scroll view here
[Music]
and find colors that
stand out so we can see we'll just use
blue
all right
all right so the next one
so if we do
get this way
so if we get rid of
the outer text and just put our text
inside of our scroll view
each text
is its own block
the first
and the second part
so you notice here they're not in line
because these texts are just added
inside of the view
when added inside of a text container
they are treated as inline text
okay does anyone have any questions
regarding the text block
nope
all right so next let's talk about some
of the limited style of inheriting
so
when we look at web pages uh typically
you'll see some type of text that looks
like this
that comment here
so on a web page you might have some css
that looks like this html
family
lucid
brand
etc
font style
the font
size
11 pixels
and color
some funky
uh
text code
now on the web we can use
this
kind of css attribute to set our font
family and the size for the entire
document
and
because we're applying it to the html
tag
this now becomes
inherited
for all of our web pages so if we apply
the css to all of our web pages
they all have the same look and feel
so all the elements in the document
again will inherit this font unless they
or one of their parent specifies a new
rule
now because of this rule react native
requires you to wrap all the text nodes
inside of a text component
you cannot have a text node directly
under a view or really you shouldn't
have a text node under a view if you
want to apply
a universal
text formatting
for example
let's go to
this one here
so
in this example here
um if we just typed in
let me do one more here so we have a
scroll view let me just do view
and
instead of putting in a text tag i just
did hello
world
it does not like that that's because you
are not allowed to just stick text into
your code
willy-nilly it tells you right here text
string must be rendered within a text
component
so this guy has to be wrapped inside of
a text tag
and that worked
now react native still has the concept
of style inheritance but it is limited
to the text subtrees
so in our example up here where we
applied the styles
we applied the style here
so it applied to the bold and then it
also applied to the subset
and then the subset we added an
additional style of red which applied
only to this text here
now
this might get seem a little convoluted
in order to format your text but you
have to think in terms of
web development or mobile development so
the
device really has no concept of things
like bold italic
like on the web we have to actually
create custom styles to do that using
the style
the css like styles of the
javascript styles object
so this more constrained way to style
text will
yield better apps that we can develop
so for instance from a developer's
perspective the react components are
designed with a strong isolation in mind
you should be able to drop component
anywhere in your application
trusting that as long as the props are
the same it will look and behave the
same way the text properties that can
inherit from the outside of the props
would break this isolation
now from an implementation perspective
the implementation of react native is
also simplified we do not need to have a
font family field on every single
element and we do not need to
potentially reverse the tree up to the
root every time we display a text node
the style inheritance is only encoded
inside of the native text component and
doesn't leak to other components or the
system itself making it very easy for us
to create custom
look and feels for our applications
so
with that
are there any questions
uh question for you mike so how
is it hard to transfer let me say this
code since it's strictly for mobile app
to turn into a web web page or can you
copy code let me say from let me say the
spring show and post it in native and it
works so tweak a few things here and
there you may have to tweak a few things
here and there uh the nice part is
so with react native
uh where's my console
so what i could also do
is i could also open this up as a web
page so if i do w
browser somewhere
up there
and it is not like something i did
what did i not save or not
it's not like something oh
yeah okay he's happy he's happy
reload
oh i need to add some components for web
so let me
go over to the
our little cheat here
so this tool will automatically
include the components it needs
to display it as a web page
so that's the nice part about react
native not only will this convert it to
a device but it will also convert it to
a web page
okay
but yes uh typically you would have to
copy
your styles over probably tweak it
slightly
like for instance in css it's background
dash color
but in react david it's background color
if you're using visual code what's so
nice about this guy
is once you're in here
if you do
yeah control space
it gives you a list of all the
attributes that you can apply for
styling
so you gotta be careful because not all
of these apply to every element gotcha
so even if you have um
so so you can pretty much even get code
from um
let me say the springs also the
uh the net framework and paste it here
and you just trick a few things then you
can you can make it in a
app easy is that possible
oh okay cool that's nice then
do they still um you i mean do they use
this a lot in like um
i mean i've been in companies whereby
they say oh we want to
build um let me say you're doing an
enterprise system and they want us and
they always say like oh we want to make
this uh we want to create the mobile and
they create let me say the mobile
testing team
so are they using this style or they
react native or they are doing it
differently
that kind of depends on the company like
the company i'm at we currently don't
have any true mobile apps um
they're using
the actual web coding
uh that allows you to say
let's do doctor who
could still be up there it is
all right so
this is a web version
but if i start shrinking my page
because of the css i have
the css basically switches my site to be
mobile like so it acts like a mobile
application but it's really a web
application so that's what the company
i'm at currently is doing for
applications now some companies may like
uh
android so they may only create android
applications so they might just go take
their java people if they have them and
go out and quickly hack out a java uh
android app using the android tools uh
it just kind of depends on the companies
truthfully
in today's world it makes really no
sense to go out to a specific
architecture and build
an app
for ios directly or android directly
unless you're doing something like
gaming
or something that's very native to an
epi uh to a device
uh
for instance like the iphone cameras if
you're doing something that's
specifically photo and you needed like
all that hd resolution dopely
uh whatever uh then yes you would
probably want to either do a swift
uh use xcode to build out your
application
uh
or android if you're doing something
specific to a particular device now with
that being said
for most generic applications you should
be doing something using a tool like
this because really
you want to get your app out to as many
people as possible uh unless there's a
reason for you not to allow your
application like to android and you want
to just strictly keep it on ios
okay thanks man
no problem
all right so with that let's just
quickly review so today we talked about
the text component
the text component is a react component
for displaying text
it supports nesting styling and touch
handling which we did not cover here but
we will cover when we get to events and
handling it's we can often define static
references so that we can declare text
globally
so we don't have to read
or constantly type the same text over
and over
this is very good to avoid typos we also
looked at the number of lines attribute
which allows us to restrict the number
of lines our text can wrap on
and we also talked about some of the
different container properties
and styling that goes along with our
text component
that's it for today's discussion on
react native
i'd like to thank you for your time if
you would like to discuss any of these
topics further or talking more about
react native
send us your comments or questions at
info development.com you can reach us
at our website developernerd.com contact
us we're also on youtube and vimeo
our goal is making every developer
better thank you have a great day
[Music]
you
Transcript Segments
0.46

[Music]

29.039

now i've briefly kind of gone over the

31.279

nesting of our text here but what is

33.52

next

34.8

so

36.16

with android and ios

38.239

they both allow you to display formatted

40.719

text by annotation ranges of a string

43.76

with specific formattings like we showed

45.92

here with bold uh color and fonts

49.44

now in practice this can be very tedious

52.719

that way this is why react native

55.12

decided to use a web paradigm for this

57.92

where you can nest the text to achieve

59.92

the same effect

62

like we showed here

65.04

so let's look at another simple example

96.32

now

100.64

this one we will do

102.24

gray

141.44

all right so in this view tag here

145.44

let me show you a cleaner view

148.16

of using nested text

151.36

let's just create a text

159.2

and inside this let's just do another

161.44

text

170.64

and the parent

172.64

i am old

181.12

i am the child

184.319

i am red

189.44

all right so here we have two text tags

192.48

uh we have our outer our parent tag

195.28

which is going to have text i am the

197.36

parent i am bold

199.12

and then inside of our parent text tag

201.28

we also have a child text tag that is

204.4

going to display the text i am the child

207.519

i am red

209.84

and bold

213.519

now to make this work we now need to

216

apply some styles

223.28

so i'll come down

224.84

here and we will add

228.56

styling

231.04

so we'll add parent

234

page

235.28

text

239.68

and we will set the font weight

245.68

new bold

252.319

and then we will set the inner text

261.919

and we will set it to be the color

267.759

red

272.32

okay so far nothing has changed

274.88

we now have two new styles that we need

276.8

to apply so we'll take our parent base

279.199

text

280.88

and we'll come up here and we will add

282.639

our style to the parent

287.36

and since this is only one style we

290.16

don't need to add extra

292.4

swirlies or an array

294.96

we can just use styles

299.28

dot

300.4

parent-based text

302.16

when we save that we see that all of our

304.72

text is bold

306.24

now what we're also seeing over here

307.68

though is all of our text is one big

309.919

line of text that's because we have no

312.639

breaks in here

313.919

and you can do that in case you want to

315.68

actually

316.8

add bold

318.16

within this

319.28

you know a line of text and then

320.8

continue on doing some other text

326.08

so we can do i am bold and then add

328.4

another style here

336.96

styles dot or text

340.88

and you can see i am the parent i am

343.199

bold and i am the child i am red and

346.56

bold

347.52

so this is an interesting way of

349.6

creating a custom style tags in order to

353.84

bold italicize your text uh

357.68

midstream within your

360.08

applications

363.199

so after that we could actually then

364.88

continue adding more text

369.12

i am

370.639

after child

372.319

and bold

380.16

so behind the scenes react native

382.16

converts this

383.68

uh formatting

385.28

to a flat ns attributed string

389.039

uh

389.84

in ios and in android it's a spannable

393.44

string i'm right that's backwards

395.84

um so

397.28

behind the scenes great native is

398.8

converting this

400.639

text

401.84

uh to a flat ns attribute string tag

406.8

now on ios is converting this to a

410.24

spannable string

412.16

so it would read something like this

414.8

it would convert it and

416.479

inside of the expandable string it would

419.199

contain the text i am bold and red

422.56

then it would have an attribute for zero

424.96

to nine being bold or basically zero

427.919

position here give the position here

431.199

uh the attribute would be bold and then

433.599

it would say the next set of texts from

436.88

this position being say 9 to 17 would be

441.599

bold and red

451.599

all right so next let's talk about the

453.68

text tag as a container

456.639

so the text element is a unique relative

459.759

to layout

461.12

everything inside is no longer unique or

464.479

using a flex

466.319

box layout

467.84

but instead it's using a text layout

471.12

this means that elements inside of a

473.199

text tag are no longer rectangles but

476.479

wrap when they see the end of the line

479.84

so to see this example let's uh create

483.599

one more example here let's bring this

486.479

text down because the height can be a

488.639

little bit smaller for our example here

494.479

there we go

495.759

so let's create another

498.479

scroll view here

509.44

and in this one let's start with a text

515.919

it starts with capital

521.76

and again we'll do nested text

531.44

in the first part this will be first

535.92

part

537.92

and

545.2

then we have second part

550.72

right we save this

552.64

we see our even though we have nested

555.04

text tags

556.8

the text is all displayed on one line

559.36

first part and second part

562.24

let me also make this guy

564.64

white

566.399

reed

571.36

yellow

572.32

ah green

578.959

all right so now here the text container

581.6

the text will be inline if the space

584.72

allows it

585.839

the first part and the second part

590.8

otherwise the text will flow as if it

593.76

was one

594.959

the first part and second and the

598.16

third so if we actually shrunk this here

602.079

we actually make our width say

605.6

50.

608.32

you see it actually

610.399

stacks the text

612.399

so it only goes in line until it reaches

615.68

the end of the container and then it

617.76

wrapped

626.399

all right so next

632.48

do another scroll view here

643.22

[Music]

649.92

and find colors that

652.64

stand out so we can see we'll just use

655.6

blue

656.64

all right

659.519

all right so the next one

661.519

so if we do

669.519

get this way

671.36

so if we get rid of

676

the outer text and just put our text

678.959

inside of our scroll view

684.48

each text

685.92

is its own block

688.399

the first

689.76

and the second part

691.92

so you notice here they're not in line

694.64

because these texts are just added

697.2

inside of the view

700.16

when added inside of a text container

703.68

they are treated as inline text

710.16

okay does anyone have any questions

713.44

regarding the text block

721.68

nope

732.32

all right so next let's talk about some

734

of the limited style of inheriting

736.959

so

737.76

when we look at web pages uh typically

740.8

you'll see some type of text that looks

744

like this

746.56

that comment here

749.6

so on a web page you might have some css

753.04

that looks like this html

758.24

family

763.6

lucid

765.519

brand

768.079

etc

770.959

font style

773.92

the font

775.36

size

781.839

11 pixels

784

and color

786.48

some funky

789.92

uh

791.76

text code

793.76

now on the web we can use

796.639

this

797.519

kind of css attribute to set our font

801.2

family and the size for the entire

803.76

document

805.76

and

806.72

because we're applying it to the html

808.8

tag

809.68

this now becomes

811.519

inherited

812.72

for all of our web pages so if we apply

816

the css to all of our web pages

818.8

they all have the same look and feel

822.72

so all the elements in the document

824.72

again will inherit this font unless they

828

or one of their parent specifies a new

831.279

rule

832.399

now because of this rule react native

835.199

requires you to wrap all the text nodes

838.56

inside of a text component

841.199

you cannot have a text node directly

843.76

under a view or really you shouldn't

846.32

have a text node under a view if you

849.04

want to apply

850.48

a universal

852.399

text formatting

854.56

for example

857.279

let's go to

859.04

this one here

861.04

so

862.32

in this example here

864.639

um if we just typed in

868.72

let me do one more here so we have a

870.8

scroll view let me just do view

876.48

and

878

instead of putting in a text tag i just

880.48

did hello

882.079

world

885.92

it does not like that that's because you

888.72

are not allowed to just stick text into

891.68

your code

892.8

willy-nilly it tells you right here text

895.44

string must be rendered within a text

898

component

901.839

so this guy has to be wrapped inside of

904.48

a text tag

914.8

and that worked

920.48

now react native still has the concept

923.199

of style inheritance but it is limited

926.48

to the text subtrees

928.88

so in our example up here where we

932.24

applied the styles

938.24

we applied the style here

941.04

so it applied to the bold and then it

944.48

also applied to the subset

947.04

and then the subset we added an

948.8

additional style of red which applied

952.079

only to this text here

955.36

now

959.759

this might get seem a little convoluted

962.079

in order to format your text but you

964.16

have to think in terms of

966.079

web development or mobile development so

970

the

971.68

device really has no concept of things

974.16

like bold italic

976.079

like on the web we have to actually

977.44

create custom styles to do that using

980.839

the style

983.6

the css like styles of the

986.48

javascript styles object

991.839

so this more constrained way to style

994.32

text will

995.839

yield better apps that we can develop

998.56

so for instance from a developer's

1000.399

perspective the react components are

1003.12

designed with a strong isolation in mind

1006.56

you should be able to drop component

1008.72

anywhere in your application

1010.639

trusting that as long as the props are

1012.48

the same it will look and behave the

1014.72

same way the text properties that can

1017.199

inherit from the outside of the props

1019.36

would break this isolation

1022.079

now from an implementation perspective

1024.959

the implementation of react native is

1027.439

also simplified we do not need to have a

1030.16

font family field on every single

1032.559

element and we do not need to

1035.439

potentially reverse the tree up to the

1038.72

root every time we display a text node

1042.559

the style inheritance is only encoded

1045.12

inside of the native text component and

1047.6

doesn't leak to other components or the

1050.24

system itself making it very easy for us

1054

to create custom

1056.559

look and feels for our applications

1065.679

so

1068.24

with that

1073.28

are there any questions

1078.96

uh question for you mike so how

1082

is it hard to transfer let me say this

1085.12

code since it's strictly for mobile app

1087.12

to turn into a web web page or can you

1089.6

copy code let me say from let me say the

1092.08

spring show and post it in native and it

1095.12

works so tweak a few things here and

1096.96

there you may have to tweak a few things

1099.2

here and there uh the nice part is

1102.16

so with react native

1104.64

uh where's my console

1108.559

so what i could also do

1110.48

is i could also open this up as a web

1113.28

page so if i do w

1118.16

browser somewhere

1132.64

up there

1138.32

and it is not like something i did

1143.679

what did i not save or not

1146.72

it's not like something oh

1153.039

yeah okay he's happy he's happy

1158.64

reload

1166.88

oh i need to add some components for web

1170.16

so let me

1172.24

go over to the

1174.64

our little cheat here

1176.24

so this tool will automatically

1179.36

include the components it needs

1182.4

to display it as a web page

1185.36

so that's the nice part about react

1186.88

native not only will this convert it to

1189.52

a device but it will also convert it to

1192.24

a web page

1193.76

okay

1195.52

but yes uh typically you would have to

1197.52

copy

1198.559

your styles over probably tweak it

1200.88

slightly

1202

like for instance in css it's background

1204.159

dash color

1205.679

but in react david it's background color

1208.799

if you're using visual code what's so

1211.2

nice about this guy

1212.88

is once you're in here

1215.76

if you do

1217.36

yeah control space

1219.44

it gives you a list of all the

1220.96

attributes that you can apply for

1222.48

styling

1226.48

so you gotta be careful because not all

1228.32

of these apply to every element gotcha

1232.48

so even if you have um

1234.72

so so you can pretty much even get code

1236.72

from um

1238.64

let me say the springs also the

1240.96

uh the net framework and paste it here

1243.44

and you just trick a few things then you

1245.2

can you can make it in a

1247.84

app easy is that possible

1250.88

oh okay cool that's nice then

1254.48

do they still um you i mean do they use

1257.2

this a lot in like um

1259.28

i mean i've been in companies whereby

1260.96

they say oh we want to

1262.72

build um let me say you're doing an

1264.48

enterprise system and they want us and

1266.32

they always say like oh we want to make

1267.679

this uh we want to create the mobile and

1269.76

they create let me say the mobile

1271.2

testing team

1272.64

so are they using this style or they

1276.24

react native or they are doing it

1278.88

differently

1281.36

that kind of depends on the company like

1283.76

the company i'm at we currently don't

1286

have any true mobile apps um

1289.12

they're using

1291.84

the actual web coding

1294.96

uh that allows you to say

1301.52

let's do doctor who

1309.919

could still be up there it is

1312.4

all right so

1313.76

this is a web version

1316.96

but if i start shrinking my page

1320

because of the css i have

1322.72

the css basically switches my site to be

1325.36

mobile like so it acts like a mobile

1328.64

application but it's really a web

1330.64

application so that's what the company

1333.039

i'm at currently is doing for

1334.799

applications now some companies may like

1338.799

uh

1339.84

android so they may only create android

1342.32

applications so they might just go take

1344.72

their java people if they have them and

1346.799

go out and quickly hack out a java uh

1350.96

android app using the android tools uh

1353.84

it just kind of depends on the companies

1355.84

truthfully

1357.36

in today's world it makes really no

1359.679

sense to go out to a specific

1361.679

architecture and build

1363.84

an app

1365.039

for ios directly or android directly

1368.96

unless you're doing something like

1370.48

gaming

1371.919

or something that's very native to an

1373.679

epi uh to a device

1375.679

uh

1376.48

for instance like the iphone cameras if

1378.799

you're doing something that's

1379.679

specifically photo and you needed like

1381.52

all that hd resolution dopely

1384.32

uh whatever uh then yes you would

1386.72

probably want to either do a swift

1389.28

uh use xcode to build out your

1391.28

application

1392.4

uh

1393.52

or android if you're doing something

1395.039

specific to a particular device now with

1397.679

that being said

1399.679

for most generic applications you should

1402

be doing something using a tool like

1404.08

this because really

1406.159

you want to get your app out to as many

1407.679

people as possible uh unless there's a

1410.159

reason for you not to allow your

1412.4

application like to android and you want

1414.48

to just strictly keep it on ios

1422.559

okay thanks man

1424.559

no problem

1436.159

all right so with that let's just

1438.159

quickly review so today we talked about

1440.72

the text component

1445.279

the text component is a react component

1448.08

for displaying text

1449.76

it supports nesting styling and touch

1452.799

handling which we did not cover here but

1455.12

we will cover when we get to events and

1456.799

handling it's we can often define static

1460

references so that we can declare text

1463.12

globally

1464.32

so we don't have to read

1466.48

or constantly type the same text over

1468.32

and over

1469.279

this is very good to avoid typos we also

1471.919

looked at the number of lines attribute

1474.48

which allows us to restrict the number

1476.799

of lines our text can wrap on

1480.159

and we also talked about some of the

1481.6

different container properties

1484

and styling that goes along with our

1485.919

text component

1489.2

that's it for today's discussion on

1491.12

react native

1492.72

i'd like to thank you for your time if

1494.72

you would like to discuss any of these

1496.24

topics further or talking more about

1498.159

react native

1499.36

send us your comments or questions at

1502

info development.com you can reach us

1506.159

at our website developernerd.com contact

1508.64

us we're also on youtube and vimeo

1512.32

our goal is making every developer

1514.08

better thank you have a great day

1518.7

[Music]

1533.36

you