A couple questions regarding this assignment.
-
How do you generate a preview of your work so far on the CodePen page? This is built into the fCC editor and descriptions during the coursework leading up to certifications usually hand wave the process (“This is handled for you on the back-end so you don’t have to worry about it.”) Unfortunately now I do have to worry about it so I’m wondering how to do it. CodePen is throwing errors like “React is not defined” etc, so clearly I need to implement something to be able to use JSX etc etc.
-
Is CodePen the best method to build this? I would like to practice with like, VSCode or something with a little more longevity in terms of future usability for projects. How would one go about doing this?
I am currently redoing the entire course to see if I missed/forgot something, so it’s possible that this is an absolutely stupid question, in which case I sincerely apologize. If this is the case and someone could point me directly to what I missed, that would be appreciated and would save me a lot of time.
I hope everyone is well.
Best,
Argh
Your code so far
JSX -
class QuoteBox extends React.Component {
constructor(props) {
super(props);
this.state = {
quote: "This is a quote.",
author: "Jon Swift",
}
}
render() {
return (
<div id="quote-box">
<p id="text">{this.state.quote}</p>
<h1 id="author">{this.state.author}</h1>
<button id="new-quote"></button>
<a id="tweet-quote"></a>
</div>
);
}
}
HTML -
<h1>Is this thing on?</h1>
As far as I can tell “Is this thing on?” does not render anywhere in the CodePen UI, nor does anything in the JSX section, but like I said before, it does not seem to recognize react components automatically like the fCC UI (not that I would expect it to).
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Challenge: Front End Development Libraries Projects - Build a Random Quote Machine
Link to the challenge: