-2
I have a question about react
, i wanted to change the content of the page by clicking, but the site recognizes only as Object.
Function
import React from 'react';
//funções
export function botao2(){
document.querySelector('.CassandraText').innerHTML = 'Downloading Cassandra';
document.querySelector('.resumo').innerHTML = <h3>Latest Beta Version</h3>;
console.log('clicado');
}
The button that calls the function
<button onClick={botao2}>
Download Cassandra
</button>
In case I was trying to open the <h3>
, but when I send to component
, he appears as object
.
Don’t try using React, if it’s new, learn Javascript, HTML, and CSS, then you can try going to React or another library/framework
– Costamilam