fastcomments-react-native-sdk
Version:
React Native FastComments Components. Add live commenting to any React Native application.
12 lines (9 loc) • 460 B
text/typescript
import {createUUID} from "./uuid";
// this could technically grow unbounded forever, but the chance that the user does enough (leaving comments, votes, etc) to make this a problem
// is slim, as they would have to add hundreds of thousands of comments before restarting the app before it slows down.
export const broadcastIdsSent: string[] = [];
export function newBroadcastId() {
const id = createUUID();
broadcastIdsSent.push(id);
return id;
}