Skip to content

Commit 13bb9b2

Browse files
committed
chore: Backport much of #793
1 parent e786c70 commit 13bb9b2

Some content is hidden

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

67 files changed

+2741
-2256
lines changed

content/en/tutorial/01-vdom.md

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

content/en/tutorial/02-events.md

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

content/en/tutorial/03-components.md

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

content/en/tutorial/04-state.md

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

content/en/tutorial/05-refs.md

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

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

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

content/en/tutorial/08-keys.md

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

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

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

content/kr/tutorial/01-vdom.md

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

content/kr/tutorial/02-events.md

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

0 commit comments

Comments
 (0)