Skip to content

Commit 089b99e

Browse files
chore: Backport much of #793
Co-authored-by: Marvin Hagemeister <[email protected]>
1 parent 1b131bb commit 089b99e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1671
-1289
lines changed

content/en/tutorial/01-vdom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ useResult(function(result) {
196196
var p = result.output.querySelector('p');
197197
var hasColor = p && p.style && p.style.color === 'purple';
198198
if (hasEm && hasColor) {
199-
store.setState({ solved: true });
199+
solutionCtx.setSolved(true);
200200
}
201201
}, []);
202202
```

content/en/tutorial/02-events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ useRealm(function (realm) {
6161
var win = realm.globalThis;
6262
var prevConsoleLog = win.console.log;
6363
win.console.log = function() {
64-
store.setState({ solved: true });
64+
solutionCtx.setSolved(true);
6565
return prevConsoleLog.apply(win.console, arguments);
6666
};
6767

content/en/tutorial/03-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ useRealm(function (realm) {
254254
255255
win.console.log = function() {
256256
if (hasComponent && check) {
257-
store.setState({ solved: true });
257+
solutionCtx.setSolved(true);
258258
}
259259
return prevConsoleLog.apply(win.console, arguments);
260260
};

content/en/tutorial/04-state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ useResult(function () {
161161
}
162162
163163
if (Number(text2[1]) === Number(text[1]) + 1) {
164-
store.setState({ solved: true });
164+
solutionCtx.setSolved(true);
165165
}
166166
}, 10);
167167
}

content/en/tutorial/05-refs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ function patch(input) {
133133
input.__patched = true;
134134
var old = input.focus;
135135
input.focus = function() {
136-
store.setState({ solved: true });
136+
solutionCtx.setSolved(true);
137137
return old.call(this);
138138
};
139139
}

content/en/tutorial/07-side-effects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ useRealm(function (realm) {
138138
var prevConsoleLog = win.console.log;
139139
win.console.log = function(m, s) {
140140
if (/Count is now/.test(m) && s === 1) {
141-
store.setState({ solved: true });
141+
solutionCtx.setSolved(true);
142142
}
143143
return prevConsoleLog.apply(win.console, arguments);
144144
};

content/en/tutorial/08-keys.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ useRealm(function (realm) {
307307
/learn preact/i.test(c[0].textContent) &&
308308
/make an awesome app/i.test(c[1].textContent)
309309
) {
310-
store.setState({ solved: true });
310+
solutionCtx.setSolved(true);
311311
}
312312
}
313313

content/en/tutorial/09-error-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ useResult(function(result) {
9898
oe.apply(this, arguments);
9999
setTimeout(function() {
100100
if (result.output.textContent.match(/error/i)) {
101-
store.setState({ solved: true });
101+
solutionCtx.setSolved(true);
102102
}
103103
}, 10);
104104
};

content/kr/tutorial/01-vdom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ useResult(function(result) {
145145
var p = result.output.querySelector('p');
146146
var hasColor = p && p.style && p.style.color === 'purple';
147147
if (hasEm && hasColor) {
148-
store.setState({ solved: true });
148+
solutionCtx.setSolved(true);
149149
}
150150
}, []);
151151
```

content/kr/tutorial/02-events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ useRealm(function (realm) {
5454
var win = realm.globalThis;
5555
var prevConsoleLog = win.console.log;
5656
win.console.log = function() {
57-
store.setState({ solved: true });
57+
solutionCtx.setSolved(true);
5858
return prevConsoleLog.apply(win.console, arguments);
5959
};
6060

0 commit comments

Comments
 (0)