30 Days of React: Day 13 | Uncontrolled Components
- styling done with mostly .css with partial done inline to implement themeColor generated from
colorMe()
custom hex color generator - loading state represented by a loading svg [1]
- utils folder addition
- qnaJSON_builder.js to generate content for level1qna.json
getPatternFromRegEx
function in customValidation.js to extract pattern which can be used inpattern
attribute of input element
pattern
attribute for validatinginput
value<input type="text" name="firstName" id="firstName" ref={firstName} pattern={nameRegEx} required />
- naming an imported image asset
import loader from '../assets/bean_eater_animated.svg'
const loadingStyle = {
height: rem(360),
width: '100%',
backgroundImage: `url(${loader})`,
backgroundRepeat: 'no-repeat',
backgroundSize: 'contain',
backgroundPosition: 'center',
}
- loader.io - used for loader [1]
- fakefiller - browser extension that fills form inputs automatically; making form testing faster
- Rest Countries API: https://restcountries.com/v3.1/all