-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
95 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
apps/compare/src/content/1-reactivity/3-computed-state/purify.js/DoubleCount.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { ref, tags } from "@purifyjs/core"; | ||
import { computed, ref, tags } from "@purifyjs/core"; | ||
|
||
const { div } = tags; | ||
|
||
export function DoubleCount() { | ||
const count = ref(10); | ||
const doubleCount = count.derive((count) => count * 2); | ||
const doubleCount = computed(() => count.val * 2); | ||
|
||
return div().children(doubleCount); | ||
} |
12 changes: 0 additions & 12 deletions
12
apps/compare/src/content/1-reactivity/3-computed-state/purify.js/DoubleCountAlternative.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
apps/compare/src/content/3-lifecycle/2-on-unmount/purify.js/TimeAlternative.ts
This file was deleted.
Oops, something went wrong.
17 changes: 5 additions & 12 deletions
17
apps/compare/src/content/4-component-composition/1-props/purify.js/App.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
import { fragment, tags } from "@purifyjs/core"; | ||
import { tags } from "@purifyjs/core"; | ||
import { UserProfile } from "./UserProfile"; | ||
|
||
const { div } = tags; | ||
|
||
export function App() { | ||
const host = div().id("app"); | ||
const shadow = host.element.attachShadow({ | ||
mode: "open", | ||
}); | ||
|
||
shadow.append( | ||
fragment( | ||
return div() | ||
.id("app") | ||
.children( | ||
UserProfile({ | ||
name: "John", | ||
age: 30, | ||
favouriteColors: ["red", "green", "blue"], | ||
isAvailable: true, | ||
}), | ||
), | ||
); | ||
|
||
return host; | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
apps/compare/src/content/7-webapp-features/1-render-app/purify.js/app.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
import { fragment, tags } from "@purifyjs/core"; | ||
import { tags } from "@purifyjs/core"; | ||
|
||
const { div, h1 } = tags; | ||
|
||
export function App() { | ||
const host = div().id("app"); | ||
const shadow = host.element.attachShadow({ | ||
mode: "open", | ||
}); | ||
shadow.append(fragment(h1().children("Hello World"))); | ||
|
||
return host; | ||
return div() | ||
.id("app") | ||
.children(h1().children("Hello World")); | ||
} | ||
|
||
document.body.append(App().element); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.