scrimba
21 web dev tips for 2021 🎇
Tip 8.1: Creating Helpers
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

AboutCommentsNotes
Tip 8.1: Creating Helpers
Expand for more info
components
PriceDisplay.js
run
preview
console
// Creating Helpers

import React from 'react'
import ReactDOM from 'react-dom'

const PriceDisplay = () => {
let price = 123.4556
return (
<div className="price-rounder-container">
<h2>Last Transaction</h2>
<div className="price-display">£{price}</div>
</div>
)
}

export default PriceDisplay

// Mini Challenge
// In the same way that we created this helper, Can you add a helpers that will help us display the // total price of all 3 the previous transactions in the App Component and the total price of the // prices in the Price Display Component?
Console
/index.html
-5:19