Skip to content

Commit

Permalink
v0.2.25
Browse files Browse the repository at this point in the history
  • Loading branch information
Je committed Nov 14, 2020
1 parent 9d68654 commit b51ae06
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function Home() {

### Installation
```bash
deno install -A -f -n aleph https://deno.land/x/[email protected].24/cli.ts
deno install -A -f -n aleph https://deno.land/x/[email protected].25/cli.ts
```

### Usage
Expand Down
2 changes: 1 addition & 1 deletion egg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aleph",
"version": "0.2.24",
"version": "0.2.25",
"description": "The React Framework in Deno.",
"homepage": "https://alephjs.org",
"repository": "https://github.com/alephjs/aleph.js",
Expand Down
5 changes: 5 additions & 0 deletions examples/hello-world/aleph.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Config } from 'https://deno.land/x/aleph/types.ts'

export default {
ssr: false
} as Config
2 changes: 1 addition & 1 deletion examples/hello-world/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ComponentType } from 'https://esm.sh/react'
import { Head } from 'https://deno.land/x/aleph/mod.ts'

export default function App({ Page, pageProps }: { Page: ComponentType<any>, pageProps: any }) {
return (
return (
<>
<Head>
<title>Hello World - Aleph.js</title>
Expand Down
31 changes: 31 additions & 0 deletions examples/hello-world/components/modal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/// <reference lib="dom" />
import { Component, PropsWithChildren } from 'https://esm.sh/react'
import ReactDOM from 'https://esm.sh/react-dom'

const modalRoot = document.createElement('div')
modalRoot.id="modal-root"
document.body.appendChild(modalRoot)

export default class Modal extends Component {
el: HTMLElement

constructor(props: PropsWithChildren<{}>) {
super(props)
this.el = document.createElement('div')
}

componentDidMount() {
modalRoot.appendChild(this.el)
}

componentWillUnmount() {
modalRoot.removeChild(this.el)
}

render() {
return ReactDOM.createPortal(
this.props.children,
this.el
)
}
}
10 changes: 5 additions & 5 deletions examples/hello-world/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Import, useDeno } from 'https://deno.land/x/aleph/mod.ts'
import { Import } from 'https://deno.land/x/aleph/mod.ts'
import React, { useState } from 'https://esm.sh/react'
import Logo from '../components/logo.tsx'

export default function Home() {
const [count, setCount] = useState(0)
const version = useDeno(() => {
return Deno.version
})
// const version = useDeno(() => {
// return Deno.version
// })

return (
<div className="page">
Expand All @@ -28,7 +28,7 @@ export default function Home() {
<button onClick={() => setCount(n => n - 1)}>-</button>
<button onClick={() => setCount(n => n + 1)}>+</button>
</p>
<p className="copyinfo">Built by Aleph.js in Deno v{version.deno}</p>
<p className="copyinfo">Built by Aleph.js in Deno v{""}</p>
</div>
)
}
2 changes: 1 addition & 1 deletion version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = '0.2.24'
export const version = '0.2.25'

1 comment on commit b51ae06

@vercel
Copy link

@vercel vercel bot commented on b51ae06 Nov 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.