├── public
├── favicon.ico
├── manifest.json
└── index.html
├── src
├── Components
│ ├── styles.scss
│ └── App.jsx
└── index.js
├── .gitignore
├── README.md
└── package.json
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pranesh239/react-component-patterns/master/public/favicon.ico
--------------------------------------------------------------------------------
/src/Components/styles.scss:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: sans-serif;
3 | h1 {
4 | color: tomato;
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from "react-dom";
3 | import App from "./Components/App";
4 |
5 | ReactDOM.render(
6 |
7 | #### Component patterns:
8 |
9 | - [Compound component pattern](https://github.com/pranesh239/react-component-patterns/tree/compound-components)
10 | - [Render props pattern](https://github.com/pranesh239/react-component-patterns/tree/render-props)
11 |
12 | [](http://makeapullrequest.com)
13 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-component-patterns",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "node-sass": "^4.12.0",
7 | "react": "^16.8.6",
8 | "react-dom": "^16.8.6",
9 | "react-scripts": "3.0.1"
10 | },
11 | "scripts": {
12 | "start": "react-scripts start",
13 | "build": "react-scripts build",
14 | "test": "react-scripts test",
15 | "eject": "react-scripts eject"
16 | },
17 | "eslintConfig": {
18 | "extends": "react-app"
19 | },
20 | "browserslist": {
21 | "production": [
22 | ">0.2%",
23 | "not dead",
24 | "not op_mini all"
25 | ],
26 | "development": [
27 | "last 1 chrome version",
28 | "last 1 firefox version",
29 | "last 1 safari version"
30 | ]
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
22 |