This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
Fork this project and continue
src
should containcomponents
,containers
andutils
.- a component is a fully reusable react class or functional component.
- a container has multiple components and it's usually not reusable.
- every directories must be in
kebab-case
- every folder must have an
index.js
- if a folder must contain another component, file naming must be in
PascalCase.js
- create Input as a component which gets
type
andonChange
function callback from props, and keeps current value of the input in state. (to learn more aboutstate
andprops
check out props-docs and state-and-lifecycles)
Note: login page is a container, while form and input are components.
- after user hitting submit button should navigate to home page. use react-router for routing.
Note: for install npm package use
npm install <package>
oryarn add <package>
-
should have props fields which is an array of objects, the object schema should be:
{name, placeholder, type, required}
-
should have
onSubmitCallback
function prop -
title and info props
-
a modal component is a nasty and hacky component but will make a better UI (I don't agree actually).
-
implement redux store
-
create an action which will open the modal
-
create a reducer which has the app modal state
{ isOpen, modalType }
- route should be like
/posts/:postId
- calls dummy api defined in
/src/api
- should present data passed from api call
- should have next and previous posts button (which rouutes will be
/routes/<:postId+1>
and/routes/<:postId-1>
)
Goals: learning promises, api calls, dynamic routing with react-router
-
animate modal opening and closing with
react-transition-group
-
style post page with
styled-components