diff --git a/deps.ts b/deps.ts index 850dbd6..5d7fb44 100644 --- a/deps.ts +++ b/deps.ts @@ -1,2 +1,6 @@ export * as path from "https://deno.land/std@0.75.0/path/mod.ts"; export { v4 } from "https://deno.land/std@0.67.0/uuid/mod.ts"; +export * as colors from "https://deno.land/std@0.61.0/fmt/colors.ts"; +export { + assertEquals, +} from "https://deno.land/std@0.76.0/testing/asserts.ts"; \ No newline at end of file diff --git a/examples/hello-app/HelloApp2.jsx b/examples/hello-app/AnotherComponent.tsx similarity index 57% rename from examples/hello-app/HelloApp2.jsx rename to examples/hello-app/AnotherComponent.tsx index 94d946c..e055d03 100644 --- a/examples/hello-app/HelloApp2.jsx +++ b/examples/hello-app/AnotherComponent.tsx @@ -1,19 +1,19 @@ -export const name = "AppHello"; -export default function() { +export const name = "component-a"; +export default function(this: VMC) { return (<> ) } -export class ViewModel { +export class VMC { message = "Hello World"; array = [1, 3]; - static props(props) { + static props(this: VMC, props: { message: string }) { + this.message = props.message; return props } } diff --git a/examples/hello-app/HelloApp.tsx b/examples/hello-app/HelloApp.tsx index a71a610..65e8170 100644 --- a/examples/hello-app/HelloApp.tsx +++ b/examples/hello-app/HelloApp.tsx @@ -1,23 +1,30 @@ -import * as HelloApp2 from './HelloApp2.jsx'; -import * as HelloApp3 from './HelloApp2.jsx'; -import * as HelloApp4 from './HelloApp2.jsx'; - -export const name = "AppHello"; -export default function(this: ViewModel): JSX.Element { +export const name = "hello-app"; +export default function(this: VMC) { // what to do about all the things referenced here // maybe it's a helper zone for SSR // but what about SPA // keep in mind, this function is just to do the dom tree return (<> -