Skip to content

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:

TypeScript
function useFetch<T>(url: string) {
  const [data, setData] = useState<T | null>(null);
  useEffect(() => { load<T>(url).then(setData); }, [url]);
  return data;
}
Exercise · Intermediate

Why does useFetch list url in its dependency array?

Type your answer...
Topics mastered
2/7

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

Generic chatbot

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
Lemma AI Tutor
Diagnostic6 questions

Level: Intermediate

Solid on useState, gaps in effect cleanup

Plan built7 topics

Next: useEffect and cleanup

Explained with a worked example

Exercise passedTopic mastered
AI tutor share of Practice3/5

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.

Diagnostic · React
3 of 6
useEffect(() => {
  const id = setInterval(tick, 1000);
  return () => clearInterval(id);
}, [delay]);

When does the returned function run?

ABefore the effect re-runs, and on unmountBAfter every renderCOnly after the first render
Level so far: Intermediate

Diagnostic assessment

The tutor starts by identifying your current level with targeted questions before building your plan.

Learning Plan
Intermediate
  1. 1State and renderingMastered
  2. 2useEffect and cleanupMastered
  3. 3Refs and the DOMNeeds review
  4. 4Custom hooksCurrent
  5. 5Context patternsNot started
  6. 6MemoizationNot started
  7. 7Testing hooksNot started
Built from 6 diagnostic answers2 of 7 mastered

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.

AI Tutor · React
In session

Exercise · useEffect and cleanup

The cleanup runs after every render.

Partly right

It runs before the effect runs again, and once on unmount. With [delay] as the dependency, that means only when delay changes.

Hint: what happens to the interval if the component unmounts first?

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.

React · practice evidence
  1. Exercise passed · custom hooks

    AI tutor · Today 14:32

    +1.0
  2. Exercise passed · useEffect and cleanup

    AI tutor · Sat 10 Oct

    +1.0
  3. Exercise passed · refs and the DOM

    AI tutor · Thu 8 Oct

    +1.0
Practice15/25
From AI tutor practice3.0/5 cap

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?

An AI coding tutor teaches a programming skill one topic at a time and checks that you understood before moving on. Lemma's tutor starts with a diagnostic, builds a plan from your gaps, explains each topic with code, an analogy or a worked example, then tests it. Passed exercises are recorded as practice evidence.

Can an AI tutor replace a human teacher when learning to code?

Not on Lemma. The tutor covers practice between live sessions, and sessions with people and adaptive assessments carry more weight. AI drills can add at most 5 of the 25 practice points in SCI, so tutor work supports other evidence rather than replacing it.

How is an AI tutor different from asking a chatbot?

A chatbot answers the question you asked. The tutor decides what to ask you: it diagnoses your level, plans topics around your gaps and tests each one before moving on. Each topic is marked mastered or flagged for review as you go.

How much does an AI tutor session cost on Lemma?

AI practice is paid in Lemma Credits. An AI tutor session costs 50 LC and a single drill costs 15 LC. Every plan adds credits each month, and teaching a live session earns more.

Does AI tutor practice count toward my skill score?

Yes, within a cap. Each passed exercise appends an evidence event to the practice part of SCI, and AI drills can contribute up to 5 points. The cap keeps practice with software from outweighing evidence from people and assessments.

Give your skills somewhere to live.

Bring your evidence together and start building a Skills Passport that can grow with you.

We use your email only to invite you to Lemma and send launch news. See our Privacy Policy.