This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useCallback, useMemo } from 'react' | |
function Devices () { | |
const [devices, setDevices] = useState() | |
const [products, setProducts] = useState([]) | |
const [page, setPage] = useState(1) | |
// Esto se ejecutara una sola vez |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @typedef {Object} Child | |
* @property {string} node | |
* * / | |
/** | |
* @typedef {Object} Configuration | |
* @property {string} name | |
* @property {boolean} execute | |
* @property {Child []} childs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
const { merge } = require('webpack-merge') | |
const { CleanWebpackPlugin } = require('clean-webpack-plugin') | |
module.exports = function (config) { | |
return merge(config, { | |
plugins: [ | |
new CleanWebpackPlugin(), | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import produce from 'immer' | |
import * as CR from '../actions/classroom' | |
/** | |
* @typedef {Object} ClassRoomState | |
* @property {Array<User>} users | |
* @property {import ('twilio-video').Room | null} room | |
* @property {import ('twilio-video').VideoTrack} track | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { memo, useState, useEffect, useRef, useCallback } from 'react' | |
import { Badge as Button, Container } from 'react-bootstrap' | |
import { Icon } from 'react-icons-kit' | |
import { ic_volume_up } from 'react-icons-kit/md/ic_volume_up' | |
import { ic_volume_off } from 'react-icons-kit/md/ic_volume_off' | |
import { ic_videocam_off } from 'react-icons-kit/md/ic_videocam_off' | |
import { ic_videocam } from 'react-icons-kit/md/ic_videocam' | |
import { ic_fullscreen } from 'react-icons-kit/md/ic_fullscreen' | |
import { ic_screen_share } from 'react-icons-kit/md/ic_screen_share' | |
import 'assets/css/video.css' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { memo, useReducer, useEffect, useCallback } from 'react' | |
import { Row, Col } from 'react-bootstrap' | |
import Video from 'twilio-video' | |
import * as TWILIO_EVENT from './actions/twilio' | |
import classRoomReducer, { initialState } from './reducer/classroom' | |
import { | |
connectUserToRoom, | |
disconnectUserToRoom, | |
setRoomNetwork, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useCallback, useMemo } from 'react' | |
/** | |
* | |
* @param {number} initialValue | |
* @param {number} limit | |
*/ | |
function useCounter(initialValue, limit) { | |
const [ state, setState ] = useState({ | |
value: initialValue, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useMemo } from 'react' | |
/** | |
* Generates an object of query parameters. | |
* @param {string} url | |
* @param {string []} dataset | |
*/ | |
function useQuery (url) { | |
const queries = useMemo(() => { | |
const params = new URLSearchParams(url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useState } from 'react' | |
function usePermissions () { | |
const [permission, setPermission] = useState({}) | |
const getPermissions = useCallback(() => { | |
fetch('....', { ...headers }) | |
.then(data => data.json()) | |
.then(permissions => setPermission({ ...permissions.response }) | |
.catch(err => // do something with the error) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<b>We use past simple for:</b> <p><b>1. Actions that are perceived as finished at a specific time in the past.</b></p> <div class=row> <div class=col-6 font-italic>I went to London last year.</div> <div class=col-6 font-italic>He got up at 7:30a.m. yesterday</div> </div> <p><b>2. Past habits.</b></p> <div class=row> <div class=col-12 font-italic>When I was a child, I often enjoyed cartoons on TV.</div> </div> <p><b>3. Series of completed actions that happened one after the other in the past.</b></p> <div class=row> <div class=col-12 font-italic>First I switched on the lights, then I got up and got dressed.</div> </div> <p><b>4. An action that interrupted another action that was in progress in the past.</b></p> <div class=row> <div class=col-12 font-italic>While I was reading, the telephone rang.</div> </div> <p><b>Time expressions</b> used in the past simple:</p> <ul class=font-weight-bold> <li> Yesterday </li> <li> Last night/week/month/year </li> <li> In 2008 </li> <li> When I was a kid </li> <li> Two days/ |
NewerOlder