Skip to content

Instantly share code, notes, and snippets.

View jmaguirrei's full-sized avatar

José Manuel Aguirre jmaguirrei

View GitHub Profile
@jmaguirrei
jmaguirrei / .babelrc
Created July 24, 2018 22:37
Nextjs Babel config Jest error
{
"presets": [
[ "next/babel", { "preset-env": { "modules": "commonjs" }} ]
],
"plugins": [
[
"module-resolver",
{
@jmaguirrei
jmaguirrei / ReactWebRTC.js
Created July 14, 2018 21:07
WebRTC React Component
import _ from 'lodash';
import React from 'react';
import {
streamClose,
manageAudio,
manageVideo,
} from './methods';
@jmaguirrei
jmaguirrei / WebRTC.js
Last active May 16, 2019 18:14
WebRTC React Boilerplate (Agora.io)
import _ from 'lodash';
import React from 'react';
import {
streamClose,
manageAudio,
manageVideo,
} from './methods';
@jmaguirrei
jmaguirrei / context.js
Last active July 18, 2018 11:28
Example of a function that creates a hoc (Higher order component)
import { createChecksStore } from '/imports/common/classes';
import { LocalStoreClass } from '/imports/common/classes'; // SHARED
import { AlertsStore } from './stores/(_Alerts_)/(_Alerts_)';
import { State } from './stores/(_State_)/(_State_)';
import createClocksStore from './stores/(_Clocks_)/(_Clocks_)';
import createSyslidesStore from './stores/(_Syslides_)/(_Syslides_)';
import createMeetingsStore from './stores/((Meetings))/((Meetings))';
import createMembersStore from './stores/((Members))/((Members))';
@jmaguirrei
jmaguirrei / Meetings-without-mobx.js
Created June 21, 2018 23:10
Meetings Store without (explicit) Mobx
import { createStore } from '/imports/common/classes/';
import { myMeetings } from './extends/myMeetings';
import { myMeeting } from './sets';
export const createStoreDefinition = Stores => ({
name: 'MeetingsStore',
Stores,
computed: {
myMeetings,
myMeeting,
@jmaguirrei
jmaguirrei / Meetings-with-mobx.js
Last active June 21, 2018 23:06
Meetings Store with explicit MobX
import { computed } from 'mobx';
import { StoreClass } from '/common/classes/';
import { myMeetings } from './extends/myMeetings';
import { myMeeting } from './sets';
export default class Store extends StoreClass {
constructor(Stores) {
super('MeetingsStore', Stores);
}