finds.dev← search

// the find

trailheadapps/lwc-recipes

★ 2,858 · JavaScript · CC0-1.0 · updated Jun 2026

A collection of easy-to-digest code examples for Lightning Web Components on Salesforce Platform

Official Salesforce sample app with ~70 self-contained LWC components demonstrating specific framework patterns — wire adapters, Apex integration, LMS, GraphQL, third-party libs, etc. Each component is a minimal working example with Jest tests included. Purely educational; not a library you install, a codebase you read and copy from.

Each recipe isolates exactly one concept with the minimum code needed — no noise, no wrapper abstractions making you hunt for what matters. Jest tests ship alongside every component, so you can see how Salesforce's @lwc/jest mocking actually works in practice rather than guessing. The component breadth is genuinely wide: GraphQL wire adapter, Light DOM, State Managers, LMS pub/sub across Aura and LWC — these are topics with thin documentation elsewhere. CI with packaging validation means the examples actually deploy; this isn't dead sample code.

Hard Salesforce Platform dependency — nothing here runs outside a scratch org or Developer Edition, so if you're evaluating LWC for open-source use (lwc.dev), this repo teaches you patterns that won't transfer. The recipes stop at the component boundary: there's no example of composing several of these patterns into a real feature, so the jump from recipe to production code is still on you. Test coverage is shallow — tests mostly verify rendering, not behavior or error paths. No recipes for newer platform features like offline-capable LWCs or Experience Cloud contexts, which matters if that's where your work is.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →