0.2.0-alpha.2 • Published 4 months ago

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

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months 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

4 months ago

0.1.31

4 months ago

0.1.30

4 months ago

0.1.29

4 months ago

0.1.28

4 months ago

0.1.27

4 months ago

0.1.25

4 months ago

0.1.24

4 months ago

0.1.23

4 months ago

0.1.22

4 months ago

0.1.21

4 months ago

0.1.20

4 months ago

0.1.19

4 months ago

0.1.18

4 months ago

0.1.17

4 months ago

0.1.16

4 months ago

0.1.15

4 months ago

0.1.14

4 months ago

0.1.13

4 months ago