getsocial-react-native-sdk
Version:
React Native wrapper for GetSocial iOS and Android SDK
25 lines (21 loc) • 557 B
JavaScript
// @flow
import User from './User.js';
/**
* UserReactions object.
*/
export default class UserReactions {
user: User
reactions: Array<String> = []
/**
* Creates a new UserReactions instance from the provider parameters.
* @param {any} reactionsMap reaction parameters
*/
constructor(reactionsMap: any) {
const rawUser = reactionsMap['user'];
if (rawUser !== undefined && rawUser != null) {
this.user = new User(rawUser);
}
this.reactions = reactionsMap['reactions'];
Object.freeze(this);
}
}