- Social and Near API updated with new features provided for VM release 2.4.0;
- Added
BOSComponent
anduseBOSComponent
. 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 byNearSocialBridgeProvider
. 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" />
</>
)
}