A
A
Andrey Ivanov2019-03-21 08:59:52
React
Andrey Ivanov, 2019-03-21 08:59:52

Why is React rendering wrong?

5c9327b350792948709905.png

Тут главный рендер. Передаю в Row цифры 1 и 2.
return (
            <Row left={1} right={2} />
        );

It should return markup with the numbers 1 in the left column and 2 in the right. And it returns the wrong component at all
return (
        <div className="row mb2">
            <div className="col-md-6">
                {left}
            </div>
            <div className="col-md-6">
                {right}
            </div>
        </div>
    );

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
hzzzzl, 2019-03-21
@newdecline

if it returns "not the same at all", then maybe you connected another Row.js from another folder somehow

M
Maxim, 2019-03-21
@kmv18

In the row.js file, specify (props), not ({left, right}), and then, to pull these values, write props.left, props.right

Example
5c933414dff10678697059.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question