A
A
ART42020-08-12 10:13:16
React
ART4, 2020-08-12 10:13:16

Passing info props?

Good afternoon, how to transfer information to the next screen.
There are news output:

<Link style={{textDecoration: 'none'}} to={{pathname: '/New', params: { id: this.props.id, title: this.props.title, image: this.props.image, announce: this.props.announce, description:this.props.description } }}>
                <div className='ItemNews' style={{ backgroundImage:"url(" + this.props.image + ")", width: '100%', backgroundPosition: 'center' }} key={this.props.id}>
                    <div className="ItemNewsTitle">
                        {this.props.title}
                    </div>
                </div>
            </Link>


It doesn't work like that, I can't take it out..
params: { id: this.props.id, title: this.props.title, image: this.props.image, announce: this.props.announce, description:this.props.description }

How to pass the parameters of this news on click to the New screen and display them there?
On the native, I understood how, but then something fell into the sediment ....

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question