# Vue.js for React Developers: A Guided Tour
Welcome to the LuPa Plant Manager Cockpit's Vue.js frontend! This guide is designed for developers familiar with React who are new to Vue.js. We'll explore the key concepts, syntax differences, and mental models needed to understand and work with this codebase.
## Table of Contents
1. [Project Structure](#project-structure)
2. [Component System](#component-system)
3. [Reactivity & State Management](#reactivity--state-management)
4. [Template Syntax vs JSX](#template-syntax-vs-jsx)
5. [Routing](#routing)
6. [Lifecycle Hooks](#lifecycle-hooks)
7. [Styling & UI Components](#styling--ui-components)
8. [Additional Resources](#additional-resources)
## Project Structure
The Vue project structure is similar to React with some key differences:
```
frontend-vue/
├── src/ # Source code directory (same as React)
│ ├── App.vue # Root component (like App.jsx in React)
│ ├── main.ts # Application entry point (like index.js)
│ ├── components/ # Reusable components (similar to React)
│ │ └── ui/ # UI component library (similar to shadcn/ui in React)
│ ├── pages/ # Page components (similar to pages/ in Next.js)
│ └── stores/ # State management (similar to Redux or Context)
├── styles/ # Global styles
└── public/ # Static assets (same as React)
```
The main difference: Vue uses Single File Components (SFC) with `.vue` extension that contain template, script, and style in one file, versus separate `.jsx/.tsx` and `.css` files in React.
## Component System
### Single File Components
Vue's Single File Components (SFCs) combine template, script, and style in one `.vue` file:
```vue
```
The closest React equivalent would be combining JSX with CSS modules or styled-components.
### Example Components
Explore our commented examples:
- [App.vue](/home/biggy/Documents/Coding/lupa-plant-manager-cockpit/frontend-vue/src/App.vue) - Root component with router setup
- [PageLayout.vue](/home/biggy/Documents/Coding/lupa-plant-manager-cockpit/frontend-vue/src/components/PageLayout.vue) - Layout component with responsive behavior
- [Navigation.vue](/home/biggy/Documents/Coding/lupa-plant-manager-cockpit/frontend-vue/src/components/Navigation.vue) - Navigation component with router links
### Component Composition
Vue components can be composed similarly to React:
```vue