How can I change my author state based on my "quote" state?

I created my 2 components, and I manage to transmit the ‘firstquote’ state in my author component, but the state of my author does not adapt according to firstquote after clicking the button.
can you help me please?

Un stylo par Dylan (

You still need to render a single component to a single element in the DOM. That component is the root component and will render all other components.

<div id="root"></div>
function App() {
  return (
      <h1>App JSX</h1>
      <SomeChildComponent />

function SomeChildComponent() {
  return <h2>Child JSX</h2>;

ReactDOM.render(<App />, document.getElementById("root"));

If your components do not render make sure you are using the correct naming convention for components. They should start with an uppercase letter.

As I suggested in your other thread, take some time to learn more about React. You can use this project as a practical way of applying what you learn.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.