0.2.0-alpha.2 • Published 2 years ago

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

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

2 years ago

0.1.31

2 years ago

0.1.30

2 years ago

0.1.29

2 years ago

0.1.28

2 years ago

0.1.27

2 years ago

0.1.25

2 years ago

0.1.24

2 years ago

0.1.23

2 years ago

0.1.22

2 years ago

0.1.21

2 years ago

0.1.20

2 years ago

0.1.19

2 years ago

0.1.18

2 years ago

0.1.17

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago