1. 01Step 01

    Start with the layout

    A lightweight SwiftUI view is the whole starting point — one container, no data yet.

  2. 02Step 02

    Add the profile card

    Drop in a reusable component instead of hand-building the card inline.

  3. 03Step 03

    Load remote data

    Switch to the view model and replace the placeholder with a real request.

  4. 04Step 04

    Add interaction

    A small piece of state turns the static card into something you can act on.

  5. 05Step 05

    Polish the experience

    A small refinement — a subtle divider and spacing pass — finishes the screen.

ContentView.swiftProfileCard.swiftTheme.swift
import SwiftUI
 
struct ContentView: View {
var body: some View {
VStack(spacing: 16) {
Text("Profile")
.font(.title2.bold())
}
.padding()
}
}
Swift
  1. 01Step 01

    Create the client

    One client instance carries the base URL for every request the app makes.

  2. 02Step 02

    Request the profile

    The same client fetches whatever endpoint the app needs next.

  3. 03Step 03

    Receive the response

    A typed response keeps the shape of the JSON explicit for the rest of the app.

  4. 04Step 04

    Render the result

    The typed profile flows straight into the UI — no extra mapping layer.

client.tsprofile.tsApp.tsx
const client = createClient({
baseURL: "https://api.acme.dev",
})
TypeScript
  1. 01Before

    Start from the simple version

    A basic profile row — a name, nothing more — is the version already shipped.

  2. 02The change

    Ship a better profile experience

    The diff shows exactly what the release adds — a header component and a follow state — next to what it removes.

ContentView.swiftProfileHeader.swift
struct ContentView: View {
var body: some View {
VStack {
Text(user.name)
}
.padding()
}
}
Swift

Create a free website with Framer, the website builder loved by startups, designers and agencies.