Skip to content

v1.7.1

Latest
Compare
Choose a tag to compare
@wpdas wpdas released this 26 Sep 16:27
· 8 commits to main since this release
53c7038
  • Social and Near API updated with new features provided for VM release 2.4.0;
  • Added BOSComponent and useBOSComponent. They are used to load a BOS Component passing its props and inject it inside the React App. It doesn't need to be wrapped by NearSocialBridgeProvider. Tested using CSR only.

Usage:

BOSComponent

import { BOSComponent } from 'near-social-bridge/components'

const MyComponent = () => {
  return (
    <>
      <BOSComponent
          src="wendersonpires.near/widget/HelloWorld"
          fullWidth
          height={400}
          props={{ username:"Ricardo Goulard" age:"23" }}
        />
    </>
  )
}

useBOSComponent

import { useBOSComponent } from 'near-social-bridge/hooks'

const MyComponent = () => {
  const HelloWorld = useBOSComponent({
    src: 'wendersonpires.near/widget/HelloWorld',
    fullWidth: true,
    height: 500,
  })

  return (
    <>
      <HelloWorld username="Ricardo Goulard" age="23" />
    </>
  )
}