Tell us what’s happening:
I’m starting the React Projects with the QuoteApp, I did a personal one before starting this one and I did it without any problems, but in this one I can’t apply the effect of an “<br />” between the <p> tags. I’m not using the tag <br /> itself because I got the desired result with <p> tags in another project. I’m using the WebStorm IDE for this project. The result I’m getting is like this:
Your code so far
The App.js code
import React from 'react';
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import QuotePage from "./quotePage";
function App() {
return (
\<div className="App">
\<QuotePage />
\</div>
);
}
export default App;
quoteProc.jsx code:
>import React from 'react';
class QuotePage extends React.Component {
constructor(props) {
super(props);
this.state = {
generated: false,
rdnNumber: 0,
quotes: [],
authos: []
}
}
render() {
return (
\<main id="quote-box" className="container flex-column">
\<div className="row justify-content-center">
\<div id="text" className="row justify-content-center text-justify">
\<p>text\</p>
\</div>
\<div id="author" className="row justify-content-center text-justify">
\<p id="author">author\</p>
\</div>
\<div className="row justify-content-center">
\<button id="new-quote" className="btn btn-primary">New Quote!\</button>
\<button id="tweet-quote" className="btn btn-info">\<a href="#">Tweet this quote!\</a>\</button>
\</div>
\</div>
\</main>
)
}
}
export default QuotePage;
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36
.
Challenge: Build a Random Quote Machine
Link to the challenge: