Eliminate all promises from application.
The Promise API is the source of many confusing errors in our application, using node style callbacks eliminates the issue without reducing code quality.
/* eslint-disable jsx-a11y/rule-name */ | |
const path = require("path") | |
require("dotenv").config({ | |
path: `../.env.${process.env.NODE_ENV}`, | |
}) | |
module.exports = { | |
siteMetadata: { |
// This file allows us to inspect the traffic going over the Native <-> JS bridge, and can be | |
// helpful for debugging. Setting this to true should never be committed to git | |
const ENABLE_BRIDGE_DEBUGGER = false; // <-- THIS SHOULD NOT BE TRUE IN MASTER!!!! | |
// if true, function arguments will get pretty printed | |
const PRETTY_PRINT = false; | |
// enable this if you want to ignore EVERY event, except for the ones that match the `FOCUSED_*` | |
// constants. If true, you configure what you want to see. If false, you configure what you DONT | |
// want to see. |
import React, { Component } from 'react' | |
import { SubWidgetLink } from './routes' | |
export default class MyComponentWithALink extends Component { | |
render() { | |
const { widget } = this.props | |
return ( | |
<div> | |
... |
var walk = require('walk'); | |
var fs = require('fs'); | |
var classesOrIds = []; | |
var viewsAndTemplates = [] | |
var walkers = []; | |
var maybeUnusedClassesOrIds = []; | |
var compleWalkersCount = 0; | |
var classesToFileMap = {} | |
// Calback Function every time a walker ends |
import React, { Component } from 'react' | |
import Subapp from './subapp/Root' | |
class BigApp extends Component { | |
render() { | |
return ( | |
<div> | |
<Subapp /> | |
<Subapp /> | |
<Subapp /> |
Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.
Here's an example video I made
brew install ffmpeg --with-libvidstab
'use strict'; | |
var createAsyncActions = require('./createAsyncActions') | |
var CategoryAPI = require('../api/CategoryAPI') | |
var CategoryActions = createAsyncActions({ | |
create: function(category) { | |
CategoryAPI | |
.create(category) |
// | |
// CJCAnonymousFacesFilter.h | |
// CJC.FaceMaskingDemo | |
// | |
// Created by Chris Cavanagh on 11/9/13. | |
// Copyright (c) 2013 Chris Cavanagh. All rights reserved. | |
// | |
#import <CoreImage/CoreImage.h> |