Frontend Development
พัฒนา Frontend ด้วย Angular, React, Vue, Next.js อย่างมืออาชีพ
npxskills add majiayu000/claude-skill-registry--skill "Frontend Development"Loading…
พัฒนา Frontend ด้วย Angular, React, Vue, Next.js อย่างมืออาชีพ
npxskills add majiayu000/claude-skill-registry--skill "Frontend Development"Loading…
Skill สำหรับพัฒนา Frontend applications ครอบคลุม 4 frameworks หลัก พร้อม best practices
src/
├── app/
│ ├── core/ # Singleton services, guards, interceptors
│ │ ├── services/
│ │ ├── guards/
│ │ └── interceptors/
│ ├── shared/ # Shared components, pipes, directives
│ │ ├── components/
│ │ ├── pipes/
│ │ └── directives/
│ ├── features/ # Feature modules
│ │ ├── auth/
│ │ ├── dashboard/
│ │ └── users/
│ └── app.component.ts
├── assets/
└── environments/
// Standalone Component with Signals (Angular 17+)
import { toSignal } from "@angular/core/rxjs-interop";
@Component({
selector: "app-user-list",
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
@for (user of users(); track user.id) {
<div>{{ user.name }}</div>
}
`,
})
export class UserListComponent {
private userService = inject(UserService);
// ใช้ toSignal() แทน effect() + subscribe
users = toSignal(this.userService.getUsers(), { initialValue: [] });
}
src/
├── components/ # Shared/reusable components
│ ├── ui/ # Basic UI components
│ └── layout/ # Layout components
├── features/ # Feature-based modules
│ ├── auth/
│ │ ├── components/
│ │ ├── hooks/
│ │ └── api.ts
│ └── users/
├── hooks/ # Shared custom hooks
├── lib/ # Utilities, helpers
├── services/ # API services
└── stores/ # State management (Zustand/Redux)
// Custom Hook Pattern
function useUsers() {
const [users, setUsers] = useState<User[]>([]);
const [loading, setLoading] = useState(true);
const [error, setError] = useState<Error | null>(null);
useEffect(() => {
fetchUsers()
.then(setUsers)
.catch(setError)
.finally(() => setLoading(false));
}, []);
return { users, loading, error };
}
// React Query Pattern
function useUsers() {
return useQuery({
queryKey: ["users"],
queryFn: fetchUsers,
staleTime: 5 * 60 * 1000,
});
}
src/
├── components/ # Shared components
│ ├── ui/
│ └── layout/
├── composables/ # Composition API functions
├── views/ # Page components
├── stores/ # Pinia stores
├── services/ # API services
├── router/
└── assets/
<script setup> syntax<script setup lang="ts">
import { ref, computed, onMounted } from "vue";
import { useUserStore } from "@/stores/user";
// Props & Emits
const props = defineProps<{
userId: number;
}>();
const emit = defineEmits<{
(e: "select", user: User): void;
}>();
// Composables
const userStore = useUserStore();
// Reactive State
const searchQuery = ref("");
// Computed
const filteredUsers = computed(() =>
userStore.users.filter((u) => u.name.includes(searchQuery.value)),
);
// Lifecycle
onMounted(() => {
userStore.fetchUsers();
});
</script>
src/
├── app/ # App Router
│ ├── (auth)/ # Route groups
│ │ ├── login/
│ │ └── register/
│ ├── dashboard/
│ │ ├── page.tsx
│ │ ├── layout.tsx
│ │ └── loading.tsx
│ ├── api/ # API Routes
│ │ └── users/
│ ├── layout.tsx
│ └── page.tsx
├── components/
│ ├── ui/
│ └── features/
├── lib/ # Utilities
└── services/ # API services
// Server Component (default)
async function UsersPage() {
const users = await fetchUsers(); // Server-side
return (
<div>
<UserList users={users} />
<AddUserButton /> {/* Client Component */}
</div>
);
}
// Client Component
("use client");
function AddUserButton() {
const [open, setOpen] = useState(false);
return <button onClick={() => setOpen(true)}>Add User</button>;
}
// Server Action
async function createUser(formData: FormData) {
"use server";
const name = formData.get("name");
await db.users.create({ name });
revalidatePath("/users");
}
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).