0.5.2 • Published 2 years ago

@whatsup/browser-pathname v0.5.2

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

Browser pathname cause stream

Install

npm i @whatsup/browser-pathname
# or
yarn add @whatsup/browser-pathname

Usage

import { fractal } from 'whatsup'
import { render } from '@whatsup/jsx'
import { pathname, redirect } from '@whatsup/browser-pathname'

const app = fractal(function* () {
    while (true) {
        switch (yield* pathname) {
            case '/':
                yield <a onClick={() => redirect('/test')}>Go to test page</a>
                continue
            case '/test':
                yield <a onClick={() => redirect('/')}>Go to home page</a>
                continue
        }
    }
})

render(app)
0.5.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.4.1

3 years ago

0.4.0

3 years ago