A
A
AndreyKiyah2019-09-04 11:08:02
JavaScript
AndreyKiyah, 2019-09-04 11:08:02

How to overwrite props?

How to overwrite props?
for example we have props which is default this.props.val = 5, we also have 2 props for example this.props.val2 = null.
in jsx there is a comparison, for example, if el === val , if it is identical, then true (everything is OK), but when this.pros val2 is overwritten, then compare it with el?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Philip Gaponenko, 2019-09-04
@AndreyKiyah

el === (val2 || val)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question