0.2.0-alpha.2 • Published 1 year ago

@phoenix-islands/data v0.2.0-alpha.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@phoenix-islands/data

Phoenix Islands is a library for creating islands of various frontend frameworks in Phoenix LiveView.

Install

cd assets
npm i react @phoenix-islands/data

Or

yarn add @phoenix-islands/data

Usage

Install elixir library

Follow instruction here to install server part

Register the component with live-view hooks

import { registerReactIsland } from '@phoenix-islands/react'

let liveSocket = new LiveSocket('/live', Socket, {
  params: { _csrf_token: csrfToken },
  hooks: {
    ...registerDataIslands({
      Logger: {
        subscribe(store, globalStore) {
          const u1 = store.subscribe(console.log)
          const u2 = globalStore.subscribe(console.log)
          return () => {
            u1()
            u2()
          }
        }
      }
    })
  }
})

License

GitHub

A project by Usage © 2023.

0.2.0-alpha.2

1 year ago

0.1.31

1 year ago

0.1.30

1 year ago

0.1.29

1 year ago

0.1.28

1 year ago

0.1.27

1 year ago

0.1.25

1 year ago

0.1.24

1 year ago

0.1.23

1 year ago

0.1.22

1 year ago

0.1.21

1 year ago

0.1.20

1 year ago

0.1.19

1 year ago

0.1.18

1 year ago

0.1.17

1 year ago

0.1.16

1 year ago

0.1.15

1 year ago

0.1.14

1 year ago

0.1.13

1 year ago