Skip to content

stariluz/hours-schedule-creator-react

Repository files navigation

Minification:

npx terser -c -m -o filename.min.js -- filename.js

Run JSX Prepocessor:

npx babel --watch src --out-dir ./dev --presets react-app/prod

Learning:

Convention for name components

(information from React components naming convention ⚛️, Charly Poly.)

[Domain]|[Page/Context]|ComponentName|[Type]
  • Domain: Which product owns this component?

  • Page/context: The product page where is expected to be. If the component appears only inside another component, the context is the parent component's name.

    What is the parent component?

    Which product subpart/page this component belongs ?

  • ComponentName: What does this component do?

  • Type: 5 types identified of components.

    • View: only render data (no API calls or internal actions).

    • Button: display an actionable.

    • Connect: legacy connect components.

    • Forms components: Input, Upload ...

    • HoC components: add component to the wrapped component and the HoC takes the original name.