akashamba
akashamba
TTCTheo's Typesafe Cult
Created by akashamba on 2/15/2025 in #questions
Looking for a Mock Interview for Frontend Intern Role (Next.js Focus)
I am currently preparing for an interview for a frontend developer intern position. This will be my first interview and I am not sure what to expect. Would appreciate any tips or resources that would help prepare for the interview. Also if you have some time and would be willing to run through a mock interview, I'd be very grateful. Thank you! 🙂
1 replies
TTCTheo's Typesafe Cult
Created by akashamba on 2/9/2025 in #questions
TypeScript React: Confused about icon: Icon and {...}: Props syntax in component props
I'm working with a Next.js and TypeScript tutorial (https://www.youtube.com/watch?v=djDgTYrFMAY), and I came across this component syntax that I'd like to understand better:
import {LucideIcon} from "lucide-react"

type Props = {
icon: LucideIcon,
label: string,
href?: string,
}

export function NavButton ({
icon: Icon,
label,
href,
}: Props) { ... }
import {LucideIcon} from "lucide-react"

type Props = {
icon: LucideIcon,
label: string,
href?: string,
}

export function NavButton ({
icon: Icon,
label,
href,
}: Props) { ... }
I'm particularly confused about two parts: 1. What's the significance of icon: Icon? 2. What does }: Props mean at the end of the parameter list? Would appreciate if someone could break down this syntax!
9 replies