(0. Install Docker: https://docs.docker.com/install/)
- Run
docker-compose up - Go to
localhost:5000 - Edit
index.php - Reload
localhost:5000 - Repeat (3)
| const max50 = str => str.length <= 50; | |
| module.exports = function addShow( | |
| eventStore, | |
| { | |
| title, | |
| time, | |
| host, | |
| location | |
| } |
| const { makeExecutableSchema } = require('graphql-tools'); | |
| const { GraphQLDateTime } = require('graphql-iso-date'); | |
| const gql = require('graphql-tag'); | |
| const { createStore } = require('../event-store'); | |
| const addShow = require('../commands/addShow'); | |
| const getShows = require('../queries/getShow'); | |
| const eventStore = createStore(); |
| module.exports = function getShows(eventStore) { | |
| return eventStore.getEvents() | |
| .reduce((shows, event) => { | |
| switch (event.type) { | |
| case 'ShowAdded': | |
| return [...shows, event.payload]; | |
| default: | |
| return shows; | |
| } | |
| }, []); |
| module.exports = { | |
| createStore() { | |
| let events = []; | |
| return { | |
| getEvents() { | |
| return events; | |
| }, | |
| commit(event) { | |
| events = [...events, event]; |
(0. Install Docker: https://docs.docker.com/install/)
docker-compose uplocalhost:5000index.phplocalhost:5000| import React from 'react'; | |
| import T from 'prop-types'; | |
| class Form extends React.Component { | |
| static propTypes = { | |
| onSubmit: T.func.isRequired, | |
| children: T.func.isRequired, | |
| }; | |
| constructor(props, ...rest) { |
| import * as popmotion from 'popmotion'; | |
| import { pop } from './RemotionPop'; | |
| const easeOutQuint = popmotion.cubicBezier(0.22, 1, 0.36, 1); | |
| const ExampleComponent = () => { | |
| // you can animate any normal HTML element, ex. `pop.h2` or `pop.span` | |
| return ( | |
| <pop.div | |
| import React, { useEffect, useState } from 'react'; | |
| import { | |
| continueRender, | |
| delayRender, | |
| useCurrentFrame, | |
| useVideoConfig, | |
| } from 'remotion'; | |
| import { css } from './utils/cssTag'; | |
| function logLoadedFonts() { |
| import React, { useEffect, useState } from 'react'; | |
| import { | |
| AbsoluteFill, | |
| continueRender, | |
| delayRender | |
| } from 'remotion'; | |
| import { getAvailableFonts } from '@remotion/google-fonts'; | |
| const availableFonts: { | |
| fontFamily: string; |