December 2019
Intermediate to advanced
598 pages
12h 21m
English
The children prop is a magical prop that all React components automatically have. It can be used to render child nodes. It's magical because it's automatically there, without us having to do anything, as well as being extremely powerful. In the following steps, we'll use the children prop when creating Page and PageTitle components:
import styled from '@emotion/styled';export const PageTitle = styled.h2` font-size: 15px; font-weight: bold; margin: 10px 0px 5px; text-align: center; text-transform: uppercase;`;
import { FC } from 'react';/** @jsx jsx */import { css, jsx } from '@emotion/core'; ...Read now
Unlock full access