Fastpack - pack JavaScript fast & easy
This gist is a submission for a lightning talk on the ReactiveConf 2018.
- JavaScript bundling can be a lot faster
- There are proper tools to guarantee consistency
- Writing OCaml code is fun!
/** | |
* Running the fast-check property-based testing library in the Deno | |
* JavaScript/TYpeScript runtime. | |
* See: https://github.com/dubzzz/fast-check | |
* | |
* This file contains all the 'simple' examples from the fast-check | |
* repo using Deno.test for the test functions and assertions | |
* from the Deno standard library. I also added some missing type | |
* annotations. | |
* |
This gist is a submission for a lightning talk on the ReactiveConf 2018.
In this talk I'd like to use 5 minutes of my time to explain to the audience why jQuery is simply way better than React.
fadeIn()
method? Nah, I don't think so. You need to install a react-transition-group package which weighs over 3GB.$.get(https://stackoverflow.com/questions/12345/adding_two_numbers_javascript)
in React? NOPE.And many, many more.
(This is a completely serious lightning talk proposal, I promise.)
In this talk we will be all discussing the origin of the furry fandom. How we will thogheter create a new furry-in-js framework. We will going over how they have changed the current fandom world, our hearts and the js world in 5 very awesome minutes! This talk is to prove a point that stars mean nothing in this case.
const { execSync } = require('child_process'); | |
const directory = 'src'; | |
const findOut = execSync('find -L src').toString(); | |
const filenames = findOut.trim().split('\n') | |
.filter(name => name.endsWith('.js')) | |
.map(name => name.replace('.js', '').replace('src/', '').replace(/\/index$/, '')); | |
console.log('Found', filenames.length, 'files in', directory); |
Please 🌟 this gist to vote for this proposal!
No other topic in software development probably has so much controversy as linting.
With a wrong workflow linting can be really a pain and will slow you and your team down. With a proper setup, though, it can save you hours of manual work reformatting the code and reducing the code-review overhead.
import React, { Component, PropTypes } from 'react'; | |
class OutsideClick extends Component { | |
static propTypes = { | |
children: PropTypes.any, | |
onClick: PropTypes.func.isRequired, | |
id: PropTypes.string, | |
tag: PropTypes.string, | |
className: PropTypes.string | |
} |
queryIds(searchIds){ | |
let ids = [...searchIds]; | |
return this.lanes.reduce((result, lane, laneIdx) => { | |
// no more ids | |
if(!ids.length) return result; | |
const notes = lane.notes; | |
const idsIndexOfLane = ids.indexOf(lane.id); |
import React from 'react' | |
import { render } from 'react-dom' | |
import { Router, browserHistory, match } from 'react-router' | |
import createStore from '../shared/lib/create-store.js' | |
import ContextProvider from '../shared/lib/context-provider.js' | |
import { fetchDataOnLocationMatch } from '../shared/lib/fetch-data.js' | |
import Root from './Root.jsx' | |
import routes from '../shared/routes.jsx' | |
import { AppContainer } from 'react-hot-loader' | |
import { observable, computed, autorun } from 'mobx' |