Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@sendbird/uikit-react
Advanced tools
React based UI kit based on sendbird javascript SDK
We are introducing a new version of the Sendbird Chat UIKit. Version 3 features a new modular architecture with more granular components that give you enhanced flexibility to customize your web and mobile apps. Check out our migration guides.
npm i @sendbird/uikit-react
For typescript projects, add node_modules/@sendbird/uikit-react/index.d.ts
to your include
section in tsconfig file to get type definitions
With Sendbird UI Kit React, we export these components:
(See src/index.jsx
)
SendBirdProvider - The context provider for SDK component
useSendbirdStateContext - Hook to access SendBirdProvider context
sendBirdSelectors - A bunch of useful selectors that can be used along with useSendbirdStateContext
Channel - A UI Component where conversations happen
ChannelList - A ChannelList UI component
ChannelSettings - A component to handle the settings of a given channel
MessageSearch - To search for a message from a Channel
OpenChannel - A UI Component where open channel conversations happen
OpenChannelSettings - A component to handle the settings of a given channel And many more...
App - is a full fledged app(group channel) component made by combining the above components so that you dont have to combine all the above components by hand. Also it can be used as an example for composing components to build a chat UI
Note 1: Dont forget to import the stylesheet from the repo too Note 2: Name of some components are different from the directories they are in(example -> Channel component is from Conversation component). Please keep that in mind
You need to install:
npm 14 deprecated warnings for fsevents& chokidar@2.1.8 will be fixed when storybook is updated to webpack 5
https://github.com/storybookjs/storybook/issues/12425#issuecomment-723043137
We tried development on Mac OS / Linux systems. You might encounter problems in running npm run build
in Windows machines
We use storybook for development and rollup for building the npm distribution(bundled JS file) Make sure you have nodejs and npm installed and run
Make a copy of env.example and save it as .env
Set your appId STORYBOOK_APP_ID
npm install
npm run storybook
npm run generate-component
generates a UI component skeleton insrc/ui
OTHERS
OTHERS/UI Components
in storybook sidebar./storybook
We use rollupJS for building the production bundle script that you want to use inside your applications.
We have both esm and commonjs output
npm run build
The bundled JS code can be found in ./release
The CSS is in ./release/dist/index.css
We have implemented tests for dumb ui components only. Technologies used: Jest, Enzyme and react-dom/test-utils
npm run test
npm run lint
src/index.d.ts
which will be copied to /release
directoryWebpack 5 removes stream and buffer componets from default polyfill To enable these, install buffer and stream and then add the following to webpack.cofig.js
module.exports = {
//...
resolve: {
fallback: {
buffer: require.resolve('buffer'),
stream: require.resolve('stream-browserify'),
},
},
};
To read more: https://webpack.js.org/configuration/resolve/#resolvefallback
export NewComponent from './src/location/of/NewComponent';
NewComponent: 'src/location/of/NewComponent',
[v3.1.2] (Aug 31 2022)
Fixes:
Type defn: Change type of react elements to React.ReactElement
React.ReactNode
and React.Component
to React.ReactElement
'ts' as const
ReactNode could be string | number | null | undefined | ReactElement | portal
and this(expecting string or number) causes warning when we use it like <CustomComp />
// in the component
{ renderMessage } = props
const CustomMessage = useMemo(() => {
return renderMessage({ ... });
}, []);
return (
<div>
<CustomMessage />
</div>
);
so expecting ReactElement is better for our case
Fix message grouping: Set isMessageGroupingEnabed to true(was set to false during v2 migration)
FAQs
Sendbird UIKit for React: A feature-rich and customizable chat UI kit with messaging, channel management, and user authentication.
The npm package @sendbird/uikit-react receives a total of 12,608 weekly downloads. As such, @sendbird/uikit-react popularity was classified as popular.
We found that @sendbird/uikit-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.