v1.1.0
- feature
mockInitialPayload
added
During the development, use mockInitialPayload
to mock the initial payload (sent by the Widget).
// Mock
import { mockInitialPayload } from 'near-social-bridge'
mockInitialPayload({
defaultRoom: 'dragon-ball-z',
})
// App
import { useInitialPayload } from 'near-social-bridge/hooks'
const MyComponent = () => {
const { defaultRoom } = useInitialPayload() // 'dragon-ball-z'
}