├── src ├── store │ ├── chats │ │ ├── selectors.js │ │ ├── actions.js │ │ └── reducer.js │ ├── messages │ │ ├── selectors.js │ │ ├── reducer.js │ │ └── actions.js │ ├── profile │ │ ├── actions.js │ │ └── reducer.js │ └── index.js ├── utils │ └── constants.js ├── components │ ├── Message │ │ ├── styles.css │ │ └── index.js │ ├── MessageList │ │ └── index.js │ ├── ChatList │ │ ├── ChatItem.js │ │ └── index.js │ ├── Profile │ │ └── index.js │ ├── Form │ │ └── index.js │ ├── Chat │ │ └── index.js │ └── Router │ │ └── index.js ├── App.js ├── setupTests.js ├── App.test.js ├── index.css ├── reportWebVitals.js ├── index.js ├── App.css └── logo.svg ├── public ├── favicon.ico ├── logo192.png ├── logo512.png ├── robots.txt ├── manifest.json └── index.html ├── .gitignore ├── package.json └── README.md /src/store/chats/selectors.js: -------------------------------------------------------------------------------- 1 | export const selectChats = (state) => state.chats; -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/5hadown1/gbreact/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/5hadown1/gbreact/HEAD/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/5hadown1/gbreact/HEAD/public/logo512.png -------------------------------------------------------------------------------- /src/store/messages/selectors.js: -------------------------------------------------------------------------------- 1 | export const selectMessages = (state) => state.messages; -------------------------------------------------------------------------------- /src/utils/constants.js: -------------------------------------------------------------------------------- 1 | export const AUTHORS = { 2 | ME: "me", 3 | BOT: "bot", 4 | }; -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/components/Message/styles.css: -------------------------------------------------------------------------------- 1 | .text { 2 | font-size: 80px; 3 | color: aqua; 4 | } 5 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import { Router } from "./components/Router"; 2 | 3 | const App = () => ; 4 | 5 | export default App; -------------------------------------------------------------------------------- /src/components/Message/index.js: -------------------------------------------------------------------------------- 1 | import "./styles.css"; 2 | 3 | export const Message = ({ author, text }) => { author } : { text }; -------------------------------------------------------------------------------- /src/store/profile/actions.js: -------------------------------------------------------------------------------- 1 | export const CHANGE_SHOW_NAME = "PROFILE::CHANGE_SHOW_NAME"; 2 | 3 | export const changeShowName = { 4 | type: CHANGE_SHOW_NAME 5 | }; -------------------------------------------------------------------------------- /src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /src/components/MessageList/index.js: -------------------------------------------------------------------------------- 1 | 2 | import { Message } from "../Message"; 3 | 4 | export const MessageList = ({ messages }) => { 5 | return ( 6 | messages.map((message) => ( 7 | 8 | )) 9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /src/components/ChatList/ChatItem.js: -------------------------------------------------------------------------------- 1 | 2 | import { ListItem } from "@mui/material"; 3 | import { Link } from "react-router-dom"; 4 | 5 | export const ChatItem = ({chat, onDeleteChat}) => ( 6 | 7 | {chat.name} 8 |
onDeleteChat(chat.id)}>X
9 |
10 | ) -------------------------------------------------------------------------------- /src/store/chats/actions.js: -------------------------------------------------------------------------------- 1 | export const ADD_CHAT = "CHATS::ADD_CHAT"; 2 | export const DELETE_CHAT = "CHATS::DELETE_CHAT"; 3 | 4 | export const addChat = (id, name) => ({ 5 | type: ADD_CHAT, 6 | payload: { 7 | id, 8 | name 9 | }, 10 | }); 11 | 12 | export const deleteChat = (id) => ({ 13 | type: DELETE_CHAT, 14 | payload: id 15 | }); -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /src/store/profile/reducer.js: -------------------------------------------------------------------------------- 1 | import { 2 | CHANGE_SHOW_NAME 3 | } from "./actions"; 4 | 5 | const initialState = { 6 | name: "Default name of user", 7 | showName: false, 8 | }; 9 | 10 | export const profileReducer = (state = initialState, action) => { 11 | switch (action.type) { 12 | case CHANGE_SHOW_NAME: { 13 | return { 14 | ...state, 15 | showName: !state.showName, 16 | }; 17 | } 18 | 19 | default: 20 | return state; 21 | } 22 | }; -------------------------------------------------------------------------------- /src/components/ChatList/index.js: -------------------------------------------------------------------------------- 1 | import { List } from "@mui/material"; 2 | import { Outlet } from "react-router-dom"; 3 | import { Form } from "../Form"; 4 | import { ChatItem } from "./ChatItem"; 5 | 6 | export const ChatList = ({ chats, onAddChat, onDeleteChat }) => ( 7 | <> 8 | 9 | {chats.map((chat) => ())} 10 | 11 |
12 | 13 | 14 | ); -------------------------------------------------------------------------------- /src/components/Profile/index.js: -------------------------------------------------------------------------------- 1 | import { useDispatch, useSelector } from "react-redux"; 2 | import { changeShowName } from "../../store/profile/actions"; 3 | 4 | 5 | export const Profile = () => { 6 | const dispatch = useDispatch(); 7 | const { showName, name } = useSelector((state) => state); 8 | 9 | const handleCheckbox = () => { 10 | dispatch(changeShowName); 11 | } 12 | 13 | return ( 14 | <> 15 | 16 |

Profile {showName && { name }}

17 | 18 | ) 19 | } -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /src/store/chats/reducer.js: -------------------------------------------------------------------------------- 1 | import { 2 | ADD_CHAT, DELETE_CHAT 3 | } from "./actions"; 4 | 5 | const initialState = []; 6 | 7 | export const chatsReducer = (state = initialState, action) => { 8 | switch (action.type) { 9 | case ADD_CHAT: { 10 | return [ 11 | ...state, 12 | { 13 | name : action.payload.name, 14 | id: action.payload.id 15 | } 16 | ] 17 | } 18 | case DELETE_CHAT: { 19 | return state.filter(({ id }) => 20 | id !== action.payload 21 | ); 22 | } 23 | 24 | default: 25 | return state; 26 | } 27 | }; -------------------------------------------------------------------------------- /src/store/messages/reducer.js: -------------------------------------------------------------------------------- 1 | import { 2 | ADD_MESSAGE 3 | } from "./actions"; 4 | import { ADD_CHAT, DELETE_CHAT } from "../chats/actions"; 5 | 6 | const initialState = {}; 7 | 8 | export const messagesReducer = (state = initialState, action) => { 9 | switch (action.type) { 10 | case ADD_MESSAGE: { 11 | return { 12 | ...state, 13 | [action.payload.chatId]:[ 14 | ...state[action.payload.chatId], action.payload.newMsg 15 | ] 16 | }; 17 | } 18 | case ADD_CHAT: { 19 | return { 20 | ...state, 21 | [action.payload.id]: [] 22 | } 23 | } 24 | case DELETE_CHAT: { 25 | const newMsgs = { ...state }; 26 | delete newMsgs[action.payload]; 27 | return newMsgs; 28 | } 29 | default: 30 | return state; 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /src/store/messages/actions.js: -------------------------------------------------------------------------------- 1 | import { AUTHORS } from "../../utils/constants"; 2 | 3 | export const ADD_MESSAGE = "MESSAGES::ADD_MESSAGE"; 4 | 5 | export const addMessage = (chatId, newMsg) => ({ 6 | type: ADD_MESSAGE, 7 | payload: { 8 | chatId : chatId, 9 | newMsg: newMsg, 10 | }, 11 | }); 12 | 13 | let timeout; 14 | 15 | export const addMessageWithThunk = (chatId, newMsg) => (dispatch, getState) => { 16 | dispatch(addMessage(chatId, newMsg)); 17 | 18 | if(newMsg.author !== AUTHORS.BOT) { 19 | clearTimeout(timeout); 20 | timeout = setTimeout(() => { 21 | const messageFromBot = { 22 | text: 'I send your message', 23 | author: AUTHORS.BOT, 24 | id: `msg-${Date.now()}`, 25 | }; 26 | dispatch(addMessage(chatId, messageFromBot)); 27 | }, 1500); 28 | } 29 | }; -------------------------------------------------------------------------------- /src/components/Form/index.js: -------------------------------------------------------------------------------- 1 | import { useRef, useEffect, useState } from "react"; 2 | import Button from '@mui/material/Button'; 3 | import TextField from '@mui/material/TextField'; 4 | 5 | export const Form = ({ onSubmit }) => { 6 | const [value, setValue] = useState(''); 7 | const textField = useRef(); 8 | const callFocus = () => textField.current?.focus(); 9 | 10 | const handleChange = (e) => { 11 | setValue(e.target.value) 12 | } 13 | 14 | const handleSubmit = (e) => { 15 | e.preventDefault(); 16 | onSubmit(value); 17 | setValue(""); 18 | callFocus(); 19 | } 20 | 21 | useEffect(() => { 22 | callFocus(); 23 | }, []); 24 | 25 | return ( 26 | 27 | 28 | 29 | 30 | ) 31 | } -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import { Router } from './components/Router'; 5 | import reportWebVitals from './reportWebVitals'; 6 | import { Provider } from "react-redux"; 7 | import { store, persistor } from "./store"; 8 | import { PersistGate } from 'redux-persist/integration/react'; 9 | 10 | ReactDOM.render( 11 | 12 | 13 | 14 | 15 | 16 | 17 | , 18 | document.getElementById('root') 19 | ); 20 | 21 | // If you want to start measuring performance in your app, pass a function 22 | // to log results (for example: reportWebVitals(console.log)) 23 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 24 | reportWebVitals(); -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | display: flex; 4 | flex-direction: row; 5 | align-items: center; 6 | justify-content: center; 7 | background-color: #282c34; 8 | } 9 | 10 | .App-logo { 11 | height: 40vmin; 12 | pointer-events: none; 13 | } 14 | 15 | @media (prefers-reduced-motion: no-preference) { 16 | .App-logo { 17 | animation: App-logo-spin infinite 20s linear; 18 | } 19 | } 20 | 21 | .App-header { 22 | background-color: #282c34; 23 | min-height: 100vh; 24 | display: flex; 25 | flex-direction: column; 26 | align-items: center; 27 | justify-content: center; 28 | font-size: calc(10px + 2vmin); 29 | color: white; 30 | } 31 | 32 | .App-link { 33 | color: #61dafb; 34 | } 35 | 36 | @keyframes App-logo-spin { 37 | from { 38 | transform: rotate(0deg); 39 | } 40 | to { 41 | transform: rotate(360deg); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers, createStore, compose, applyMiddleware } from "redux"; 2 | import thunk from "redux-thunk"; 3 | import { persistReducer, persistStore } from "redux-persist"; 4 | import storage from 'redux-persist/lib/storage'; 5 | import { profileReducer } from "./profile/reducer"; 6 | import { chatsReducer } from "./chats/reducer"; 7 | import { messagesReducer } from "./messages/reducer"; 8 | 9 | const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; 10 | 11 | const rootReducer = combineReducers({ 12 | profile: profileReducer, 13 | chats: chatsReducer, 14 | messages: messagesReducer 15 | }); 16 | 17 | const persistConfig = { 18 | key: 'root', 19 | storage, 20 | } 21 | 22 | const persistedReducer = persistReducer(persistConfig, rootReducer); 23 | 24 | export const store = createStore( 25 | persistedReducer, 26 | composeEnhancers(applyMiddleware(thunk)) 27 | ); 28 | 29 | export const persistor = persistStore(store); 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gbreact", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@emotion/react": "^11.7.1", 7 | "@emotion/styled": "^11.6.0", 8 | "@mui/material": "^5.4.0", 9 | "@testing-library/jest-dom": "^5.16.1", 10 | "@testing-library/react": "^12.1.2", 11 | "@testing-library/user-event": "^13.5.0", 12 | "react": "^17.0.2", 13 | "react-dom": "^17.0.2", 14 | "react-redux": "^7.2.6", 15 | "react-router-dom": "^6.2.1", 16 | "react-scripts": "5.0.0", 17 | "redux": "^4.1.2", 18 | "redux-persist": "^6.0.0", 19 | "redux-thunk": "^2.4.1", 20 | "web-vitals": "^2.1.4" 21 | }, 22 | "scripts": { 23 | "start": "react-scripts start", 24 | "build": "react-scripts build", 25 | "test": "react-scripts test", 26 | "eject": "react-scripts eject" 27 | }, 28 | "eslintConfig": { 29 | "extends": [ 30 | "react-app", 31 | "react-app/jest" 32 | ] 33 | }, 34 | "browserslist": { 35 | "production": [ 36 | ">0.2%", 37 | "not dead", 38 | "not op_mini all" 39 | ], 40 | "development": [ 41 | "last 1 chrome version", 42 | "last 1 firefox version", 43 | "last 1 safari version" 44 | ] 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/components/Chat/index.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useRef } from "react"; 2 | import { MessageList } from "../MessageList"; 3 | import { Form } from '../Form'; 4 | import { AUTHORS } from "../../utils/constants"; 5 | import { Navigate, useParams } from "react-router"; 6 | 7 | import "../../App.css"; 8 | import { addMessageWithThunk } from "../../store/messages/actions"; 9 | import { useDispatch } from "react-redux"; 10 | 11 | export function Chat( { messages } ) { 12 | const params = useParams(); 13 | const dispatch = useDispatch(); 14 | const { chatId } = params; 15 | 16 | const messagesEnd = useRef(); 17 | 18 | const handleAddMessage = (text) => { 19 | sendMessage(text, AUTHORS.ME); 20 | }; 21 | 22 | const sendMessage = (text, author) => { 23 | const newMsg = { 24 | text: text, 25 | author: author, 26 | id: `msg-${Date.now()}`, 27 | }; 28 | dispatch(addMessageWithThunk(chatId, newMsg)); 29 | }; 30 | 31 | useEffect(() => { 32 | messagesEnd.current?.scrollIntoView(); 33 | }, [messages]); 34 | 35 | if (!messages[chatId]) { 36 | return ; 37 | } 38 | 39 | return ( 40 |
41 |
42 | 43 |
44 |
45 |
46 | ); 47 | } -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/components/Router/index.js: -------------------------------------------------------------------------------- 1 | import { BrowserRouter, Routes, Route, NavLink } from "react-router-dom"; 2 | import { Chat } from "../Chat"; 3 | import { ChatList } from "../ChatList"; 4 | import { Profile } from "../Profile"; 5 | import { useDispatch, useSelector } from "react-redux"; 6 | import { addChat, deleteChat } from "../../store/chats/actions"; 7 | import { addMessage } from "../../store/messages/actions"; 8 | import { selectChats } from "../../store/chats/selectors"; 9 | import { selectMessages } from "../../store/messages/selectors"; 10 | 11 | const Home = () =>

Home page

; 12 | 13 | export const Router = () => { 14 | const chatList = useSelector(selectChats); 15 | const messages = useSelector(selectMessages); 16 | const dispatch = useDispatch(); 17 | 18 | const handleAddMessage = (chatId, newMsg) => { 19 | dispatch(addMessage(chatId, newMsg)); 20 | }; 21 | 22 | const handleAddChat = (newChatName) => { 23 | const newId = `chat-${Date.now()}`; 24 | 25 | const newChat = { 26 | id: newId, 27 | name: newChatName 28 | }; 29 | 30 | dispatch(addChat(newId, newChatName)); 31 | }; 32 | 33 | const handleDeleteChat = (idToDelete) => { 34 | dispatch(deleteChat(idToDelete)); 35 | }; 36 | 37 | return ( 38 | 39 |
40 | ({ color: isActive ? "green" : "grey" })} 43 | > 44 | home 45 | 46 |
47 |
48 | ({ color: isActive ? "green" : "grey" })} 50 | to="/profile" 51 | > 52 | Profile 53 | 54 |
55 |
56 | ({ color: isActive ? "green" : "grey" })} 58 | to="/chats" 59 | > 60 | chats 61 | 62 |
63 | 64 | } /> 65 | } /> 66 | }> 67 | } /> 68 | 69 | 404} /> 70 | 71 |
72 | ); 73 | }; -------------------------------------------------------------------------------- /src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | --------------------------------------------------------------------------------