Smallroundears Website
Overview
What is this website for?
This is a website for people to learn about Hippopotami and/or then test them on their knowledge.
<html> | |
<head> | |
<title>Nasa prva web stranica</title> | |
</head> | |
<body> | |
<h1> Moj prvi heading. </h1> | |
<h2> Moj drugi heading. </h2> | |
</body> | |
</html> |
This is a website for people to learn about Hippopotami and/or then test them on their knowledge.
//why is es6 important | |
/* | |
lots of syntax sugar | |
faster solutions | |
cleaner solutions | |
*/ | |
// arrow functions |
import React from 'react'; | |
const KeywordHighlighter = (props) => { | |
const allowedKeywords = ["dosage", "happy", "sunny"]; // just some random words that would be highlighted | |
const filteredKeywords = allowedKeywords.filter((word) => props.value.includes(word)); | |
return ( | |
<div> | |
<textarea | |
type="text" | |
name="keyword" |
const incrementCount = ( {incrementBy = 1 } = {} ) => { | |
return { | |
type: 'INCREMENT', | |
incrementBy | |
} | |
} |
const incrementCount = ( {incrementBy = 1 } = {} ) => { | |
console.log(incrementBy) // propery on the payload object | |
/* | |
payload = { | |
incrementBy: 5 | |
} | |
*/ | |
return { | |
type: 'INCREMENT', | |
incrementBy: incrementBy |
const incrementCount = ( {incrementBy} = {} ) => { | |
console.log(incrementBy) // propery on the payload object | |
/* | |
payload = { | |
incrementBy: 5 | |
} | |
*/ | |
return { | |
type: 'INCREMENT', | |
incrementBy: typeof incrementBy === "number" ? incrementBy : 1 |
// action generator returns action object!! | |
const incrementCount = ( payload = {} ) => { | |
// if payload doesn't exist it defaults to {} | |
// calling property on undefined object will throw an error | |
// payload is an object passed to incrementCount | |
return { | |
// returns new action object! | |
type: 'INCREMENT', | |
incrementBy: typeof payload.incrementBy === "number" ? payload.incrementBy : 1 | |
} |
@import url('https://fonts.googleapis.com/css?family=Poppins'); | |
/*------------------------------General--------------------------*/ | |
body { | |
font-family: 'Poppins', sans-serif; | |
} | |
section { | |
margin-left: 100px; | |
margin-right: 100px; |