Method | Side effects1 | State updates2 | Example uses |
---|---|---|---|
Mounting | |||
componentWillMount |
✓ | Constructor equivalent for createClass |
|
render |
Create and return element(s) | ||
componentDidMount |
✓ | ✓ | DOM manipulations, network requests, etc. |
Updating | |||
componentWillReceiveProps |
✓ | Update state based on changed props |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const DARE_DEVIL = require('../../assets/images/dare-devil.jpeg'); | |
const HOUSE_OF_CARDS = require('../../assets/images/house-of-cards.jpeg'); | |
const LUKE_CAGE = require('../../assets/images/luke-cage.jpeg'); | |
const ORANGE_IS_THE_NEW_BLACK = require('../../assets/images/orange-is-the-new-black.jpeg'); | |
const STRANGER_THINGS = require('../../assets/images/stranger-things.jpeg'); | |
const SHOWS = [ | |
{ | |
title: 'Daredevil', | |
summary: 'When a young boy vanishes, a small town uncovers a mystery involving a secret experiment, terrify supernatural forces, and one strange little girl', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const COLORS = { | |
GREY: { | |
BLACK_RUSSIAN: '#0A0A0B', | |
BRIGHT_GREY: '#5A5B60', | |
}, | |
RED: { | |
FIRE_ENGINE_RED: '#D81120', | |
}, | |
WHITE: { | |
WHITE: '#FFFFFF', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": ["babel-preset-expo"], | |
"env": { | |
"development": { | |
"plugins": [ | |
"transform-react-jsx-source", | |
["module-resolver", { | |
"root": ["./src"] | |
}] | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import styled, { keyframes } from 'styled-components'; | |
import { COLORS } from 'constants/styles'; | |
const shift = keyframes` | |
0%{ | |
left: -60px | |
opacity: 0; | |
background-color: ${COLORS.YELLOW.YELLOW}; | |
} |
NewerOlder