We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76b801a commit 6d10effCopy full SHA for 6d10eff
website/docs/api-reference/relay-runtime/observe-fragment.md
@@ -51,17 +51,19 @@ function MyComponent({ key }) {
51
}
52
`,
53
user,
54
- ).subscribe(result => {
55
- switch(result.kind) {
56
- case "loading":
57
- window.title = "...loading";
58
- break;
59
- case "error":
60
- window.title = "Oops, we hit an error";
61
62
- case "ok":
63
- window.title = `Welcome ${result.value.name}`;
64
+ ).subscribe({
+ next: (result) => {
+ switch(result.kind) {
+ case "loading":
+ window.title = "...loading";
+ break;
+ case "error":
+ window.title = "Oops, we hit an error";
+ case "ok":
+ window.title = `Welcome ${result.value.name}`;
65
66
+ }
67
68
});
69
return () => {
0 commit comments