An AI coding tutor that turns practice into proof.
Lemma's AI tutor is a coding tutor, not an open chat. It finds your level, plans the topics you are missing, explains each one and tests whether it stuck. Passed exercises are recorded as practice evidence on your Skills Passport.
AI Tutor · React
Topic 4 of 7 · Custom hooks
Welcome back. You mastered useEffect cleanup on Saturday, so next up is custom hooks.
When should I pull logic out into a custom hook?
When two components repeat the same stateful logic. Here is the fetch from your last exercise, extracted:
function useFetch<T>(url: string) {
const [data, setData] = useState<T | null>(null);
useEffect(() => { load<T>(url).then(setData); }, [url]);
return data;
}Why does useFetch list url in its dependency array?
It checks you understood before it moves on.
Most AI tools answer the question you asked. Lemma's tutor starts with a diagnostic, builds a plan by topic, explains each one and tests it before moving on.
Diagnostic first: it checks what you know before it teaches
Explanations adapt: code, analogy or worked example, depending on what lands
Passed exercises are recorded as evidence for the Practice part of SCI
Explain React hooks
React hooks are functions that let you use state and lifecycle features in function components. The most common are useState and useEffect...
Got it, thanks
- Same answer at every level
- Nothing checks you understood
- Nothing is recorded
Level: Intermediate
Solid on useState, gaps in effect cleanup
Next: useEffect and cleanup
Explained with a worked example
From diagnosis to evidence.
Tutor practice feeds the Practice part of SCI and shows up on your Skills Passport. Why tutor practice is capped is explained in the methodology.
useEffect(() => {
const id = setInterval(tick, 1000);
return () => clearInterval(id);
}, [delay]);When does the returned function run?
Diagnostic assessment
The tutor starts by identifying your current level with targeted questions before building your plan.
- 1State and renderingMastered
- 2useEffect and cleanupMastered
- 3Refs and the DOMNeeds review
- 4Custom hooksCurrent
- 5Context patternsNot started
- 6MemoizationNot started
- 7Testing hooksNot started
Personalised curriculum
A plan of topics is built from your gaps and goals. Each topic is marked mastered or flagged for review as you go.
Exercise · useEffect and cleanup
The cleanup runs after every render.
It runs before the effect runs again, and once on unmount. With [delay] as the dependency, that means only when delay changes.
Feedback on every answer
Every answer is graded with an explanation. After a miss, the tutor asks where you got stuck and explains the idea another way; after three, it flags the topic for review instead of moving on.
- +1.0
Exercise passed · custom hooks
AI tutor · Today 14:32
- +1.0
Exercise passed · useEffect and cleanup
AI tutor · Sat 10 Oct
- +1.0
Exercise passed · refs and the DOM
AI tutor · Thu 8 Oct
Practice evidence
Each passed exercise appends an evidence event. AI drills can add up to 5 of the 25 points in the Practice part of SCI.
Frequently asked questions
What is an AI coding tutor?
Can an AI tutor replace a human teacher when learning to code?
How is an AI tutor different from asking a chatbot?
How much does an AI tutor session cost on Lemma?
Does AI tutor practice count toward my skill score?
Give your skills somewhere to live.
Bring your evidence together and start building a Skills Passport that can grow with you.

