Skip to content

react #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: v3-7
Choose a base branch
from
Open

react #110

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
18 changes: 17 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
{
"presets": [
"react",
["es2015", {modules: false, loose: true}]
["env", {
"targets": {
"browsers": "last 2 versions"
},
"loose": true,
"modules": false
}]
],
"plugins": [
"react-hot-loader/babel",
"babel-plugin-syntax-dynamic-import",
"babel-plugin-dynamic-import-webpack",
"babel-plugin-transform-decorators-legacy",
"babel-plugin-transform-class-properties"
],
"env": {
"server": {
"plugins": ["transform-es2015-modules-commonjs"]
},
"development": {
"plugins": ["transform-es2015-modules-commonjs"]
},
"test": {
"plugins": ["transform-es2015-modules-commonjs"]
}
Expand Down
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ indent_size = 2
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
public/
30 changes: 28 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
{
"extends": ["standard", "standard-react"]
}
"extends": [
"plugin:flowtype/recommended",
"airbnb",
"prettier",
"prettier/react"
],
"plugins": [
"flowtype",
"prettier"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2016,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"es6": true,
"jest": true,
"browser": true,
"node": true
},
"globals": {
"DEBUG": false
}
}
9 changes: 9 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[ignore]
<PROJECT_ROOT>/node_modules/styled-components/*

[include]

[libs]
styled-components

[options]
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
public/bundle.js
node_modules/
.eslintcache
coverage
coverage/
.nyc_output
.DS_Store
public/*bundle*
*.map
*.bundle.js
_site/
.sass-cache/
*.iml
.idea/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# A Complete Intro to React
# <h1>This Course Has Been Updated. <a href="https://frontendmasters.com/learn/react/">The React Learning Path</a> has the latest version of the course.</h1>

Welcome to a complete intro to React! The site actual workshop material for this repo can be found [here][gh-page]. On the master branch you will find the completed project. On the start branch you will find the barebones boilerplater of the project designed to help you get started.
Welcome to a complete intro to React! We've still left the archived v3 version of the [course website][gh-page] up if you'd still like to follow along with one of the earlier versions.

## Contributing

Expand Down
124 changes: 124 additions & 0 deletions data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"shows": [
{
"title": "Atlanta",
"year": "2008–2013",
"description": "Two cousins, with different views on art versus commerce, on their way up through the Atlanta rap scene; \"Earnest 'Earn' Marks,\" an ambitious college drop-out and his estranged cousin, who suddenly becomes a star.",
"poster": "a.jpg",
"imdbID": "tt4288182",
"trailer": "MpEdJ-mmTlY"
},
{
"title": "Billions",
"year": "2016–",
"description": "U.S. Attorney Chuck Rhoades goes after hedge fund king, Bobby \"Axe\" Axelrod in a battle between two powerful New York figures.",
"poster": "b.jpg",
"imdbID": "tt4270492",
"trailer": "_raEUMLL-ZI"
},
{
"title": "Black Mirror",
"year": "2011–",
"description": "A television anthology series that shows the dark side of life and technology.",
"poster": "bm.jpg",
"imdbID": "tt2085059",
"trailer": "jDiYGjp5iFg"
},
{
"title": "Breaking Bad",
"year": "2008–2013",
"description": "A high school chemistry teacher diagnosed with inoperable lung cancer turns to manufacturing and selling methamphetamine in order to secure his family's future.",
"poster": "bb.jpg",
"imdbID": "tt0903747",
"trailer": "XZ8daibM3AE"
},
{
"title": "Game of Thrones",
"year": "2011–",
"description": "Nine noble families fight for control over the mythical lands of Westeros, while a forgotten race returns after being dormant for thousands of years.",
"poster": "got.jpg",
"imdbID": "tt0944947",
"trailer": "giYeaKsXnsI"
},
{
"title": "Homeland",
"year": "2011–",
"description": "A bipolar CIA operative becomes convinced a prisoner of war has been turned by al-Qaeda and is planning to carry out a terrorist attack on American soil.",
"poster": "h.jpg",
"imdbID": "tt1796960",
"trailer": "KyFmS3wRPCQ"
},
{
"title": "House of Cards",
"year": "2013–",
"description": "A Congressman works with his equally conniving wife to exact revenge on the people who betrayed him.",
"poster": "hoc.jpg",
"imdbID": "tt1856010",
"trailer": "NTzycsqxYJ0"
},
{
"title": "Master of None",
"year": "2015–",
"description": "The personal and professional life of Dev, a 30-year-old actor in New York.",
"poster": "mon.jpg",
"imdbID": "tt4635276",
"trailer": "6bFvb3WKISk"
},
{
"title": "Narcos",
"year": "2015–",
"description": "A chronicled look at the criminal exploits of Colombian drug lord Pablo Escobar.",
"poster": "n.jpg",
"imdbID": "tt2707408",
"trailer": "U7elNhHwgBU"
},
{
"title": "Orange Is the New Black",
"year": "2013–",
"description": "The story of Piper Chapman, a woman in her thirties who is sentenced to fifteen months in prison after being convicted of a decade-old crime of transporting money for her drug-dealing girlfriend.",
"poster": "oitnb.jpg",
"imdbID": "tt2372162",
"trailer": "th8WT_pxGqg"
},
{
"title": "Silicon Valley",
"year": "2014–",
"description": "Follows the struggle of Richard Hendricks, a silicon valley engineer trying to build his own company called Pied Piper.",
"poster": "sv.jpg",
"imdbID": "tt2575988",
"trailer": "69V__a49xtw"
},
{
"title": "Stranger Things",
"year": "2016–",
"description": "When a young boy disappears, his mother, a police chief, and his friends must confront terrifying forces in order to get him back.",
"poster": "st.jpg",
"imdbID": "tt4574334",
"trailer": "9Egf5U8xLo8"
},
{
"title": "The Americans",
"year": "2013–",
"description": "Two Soviet intelligence agents pose as a married couple to spy on the American government.",
"poster": "ta.jpg",
"imdbID": "tt2149175",
"trailer": "HjuUkbhsI24"
},
{
"title": "Veep",
"year": "2012–",
"description": "Former Senator Selina Meyer finds that being Vice President of the United States is nothing like she hoped and everything that everyone ever warned her about.",
"poster": "v.jpg",
"imdbID": "tt1759761",
"trailer": "I2HoCG_iyhU"
},
{
"title": "Westworld",
"year": "2016–",
"description": "Set at the intersection of the near future and the reimagined past, explore a world in which every human appetite, no matter how noble or depraved, can be indulged without consequence.",
"poster": "ww.jpg",
"imdbID": "tt0475784",
"trailer": "eX3u0IlBBO4"
}
]
}
120 changes: 120 additions & 0 deletions flow-typed/npm/axios_v0.16.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
// flow-typed signature: b371e1002f7439f9f053dc08186c5375
// flow-typed version: dbaff82b4f/axios_v0.16.x/flow_>=v0.28.x

declare module 'axios' {
declare interface ProxyConfig {
host: string;
port: number;
}
declare interface Cancel {
constructor(message?: string): Cancel;
message: string;
}
declare interface Canceler {
(message?: string): void;
}
declare interface CancelTokenSource {
token: CancelToken;
cancel: Canceler;
}
declare interface CancelToken {
constructor(executor: (cancel: Canceler) => void): CancelToken;
static source(): CancelTokenSource;
promise: Promise<Cancel>;
reason?: Cancel;
throwIfRequested(): void;
}
declare interface AxiosXHRConfigBase<T> {
adapter?: <T>(config: AxiosXHRConfig<T>) => Promise<AxiosXHR<T>>;
auth?: {
username: string,
password: string
};
baseURL?: string,
cancelToken?: CancelToken;
headers?: Object;
httpAgent?: mixed; // Missing the type in the core flow node libdef
httpsAgent?: mixed; // Missing the type in the core flow node libdef
maxContentLength?: number;
maxRedirects?: 5,
params?: Object;
paramsSerializer?: (params: Object) => string;
progress?: (progressEvent: Event) => void | mixed;
proxy?: ProxyConfig;
responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
timeout?: number;
transformRequest?: Array<<U>(data: T) => U|Array<<U>(data: T) => U>>;
transformResponse?: Array<<U>(data: T) => U>;
validateStatus?: (status: number) => boolean,
withCredentials?: boolean;
xsrfCookieName?: string;
xsrfHeaderName?: string;
}
declare type $AxiosXHRConfigBase<T> = AxiosXHRConfigBase<T>;
declare interface AxiosXHRConfig<T> extends AxiosXHRConfigBase<T> {
data?: T;
method?: string;
url: string;
}
declare type $AxiosXHRConfig<T> = AxiosXHRConfig<T>;
declare class AxiosXHR<T> {
config: AxiosXHRConfig<T>;
data: T;
headers: Object;
status: number;
statusText: string,
request: http$ClientRequest | XMLHttpRequest
}
declare type $AxiosXHR<T> = $AxiosXHR<T>;
declare class AxiosInterceptorIdent extends String {}
declare class AxiosRequestInterceptor<T> {
use(
successHandler: ?(response: AxiosXHRConfig<T>) => Promise<AxiosXHRConfig<*>> | AxiosXHRConfig<*>,
errorHandler: ?(error: mixed) => mixed,
): AxiosInterceptorIdent;
eject(ident: AxiosInterceptorIdent): void;
}
declare class AxiosResponseInterceptor<T> {
use(
successHandler: ?(response: AxiosXHR<T>) => mixed,
errorHandler: ?(error: mixed) => mixed,
): AxiosInterceptorIdent;
eject(ident: AxiosInterceptorIdent): void;
}
declare type AxiosPromise<T> = Promise<AxiosXHR<T>>;
declare class Axios {
constructor<T>(config?: AxiosXHRConfigBase<T>): void;
$call: <T>(config: AxiosXHRConfig<T> | string, config?: AxiosXHRConfig<T>) => AxiosPromise<T>;
request<T>(config: AxiosXHRConfig<T>): AxiosPromise<T>;
delete<T>(url: string, config?: AxiosXHRConfigBase<T>): AxiosPromise<T>;
get<T>(url: string, config?: AxiosXHRConfigBase<T>): AxiosPromise<T>;
head<T>(url: string, config?: AxiosXHRConfigBase<T>): AxiosPromise<T>;
post<T>(url: string, data?: mixed, config?: AxiosXHRConfigBase<T>): AxiosPromise<T>;
put<T>(url: string, data?: mixed, config?: AxiosXHRConfigBase<T>): AxiosPromise<T>;
patch<T>(url: string, data?: mixed, config?: AxiosXHRConfigBase<T>): AxiosPromise<T>;
interceptors: {
request: AxiosRequestInterceptor<mixed>,
response: AxiosResponseInterceptor<mixed>,
};
defaults: AxiosXHRConfig<*> & { headers: Object };
}

declare class AxiosError<T> extends Error {
config: AxiosXHRConfig<T>;
response: AxiosXHR<T>;
code?: string;
}

declare type $AxiosError<T> = AxiosError<T>;

declare interface AxiosExport extends Axios {
Axios: typeof Axios;
Cancel: Class<Cancel>;
CancelToken: Class<CancelToken>;
isCancel(value: any): boolean;
create(config?: AxiosXHRConfigBase<any>): Axios;
all: typeof Promise.all;
spread(callback: Function): (arr: Array<any>) => Function
}
declare module.exports: AxiosExport;
}
Loading