Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

redux-photo-app

> 编程语言
Open source

Mini Project: Photo App Setup environment Github Project: https://github.com/paulnguyen-mn/redux-photo-app 1. Setup ReactJS App via Create …

99 stars0 likes2 views
WebsiteGitHub

About

Mini Project: Photo App Setup environment Github Project: https://github.com/paulnguyen-mn/redux-photo-app 1. Setup ReactJS App via Create …

Mini Project: Photo App

Setup environment

Github Project: https://github.com/paulnguyen-mn/redux-photo-app

1. Setup ReactJS App via Create React App

Link: https://create-react-app.dev/docs/getting-started/

2. Add SCSS support

javascript
npm i --save-dev node-sass

3. Add react router

bash
npm i --save react-router-dom

4. Add UI lib

bash
npm i --save reactstrap

Tổ chức folder

src
|__ assets
|  |__ images
|  |__ styles (global styles) 
|
|__ components (shared components)
|
|__ features
  |__ Photo
    |__ components
    |  |__ PhotoList
    |  |__ PhotoCard
    |  |__ PhotoForm
    |
    |__ pages
    |  |__ MainPage
    |  |__ AddEditPage
    |__ photoSlice.js
    |__ index.js

Tổ chức routing

  • Sử dụng kĩ thuật lazy load components.
  • Load theo features.
javascript
// App.js
function App() {
  return (
    
      
        
        
        
      
    
  )
}

Custom Field

  • Cầu nối giữa UI control và Formik.
  • UI control là một controlled component với props:
    • name: tên xác định control
    • value: giá trị của control
    • onChange: trigger hàm này với giá trị mới khi có thay đổi
    • onBlur: xác định khi nào thì control này bị touched
javascript
function InputField(props) {
  const {
    field,
    type, label, placeholder, disabled,
  } = props;
  const { name } = field;

  return (
    
      {label && {label}}

      
    
  );
}

Random Photo control

RandomPhoto Props

  • name
  • imageUrl
  • onImageUrlChange
  • onRandomButtonBlur

RandomPhotoField

Formik

Yup

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言