Skip to content

Instantly share code, notes, and snippets.

View MoOx's full-sized avatar
:shipit:
Freelance React / React Native Expert, Cross-platform fanboy (native, web...)

Max Thirouin MoOx

:shipit:
Freelance React / React Native Expert, Cross-platform fanboy (native, web...)
View GitHub Profile
@MoOx
MoOx / __tests__file.js
Created April 20, 2017 13:00
jest + react-native + error "Something went wrong initializing the native ReactLocalization module"
// now no problem :D
@MoOx
MoOx / index.md
Last active January 28, 2018 15:24
MacBook Pro Thunderbold 3 / USB-C Dock station list

| Name | Henge Docks - Horizontal Docking Station | Henge Docks - Tethered Dock | TS3 Lite CalDigit | TS3 CalDigit | Thunderbolt 3 Express Dock HD | Plugable TB3 | Elgato TB 3 Dock | OWC Thunderbolt 3 Dock | |----------------|--

export const BOTTOM_LEFT = `
┌──────────────┐
│ │
├──────┐ │
│■■■■■■│ │
│■■■■■■│ │
└──────┴───────┘
`
@MoOx
MoOx / Stylable.js
Created October 21, 2016 10:43
Stylable component that works well with React inline styles
// @flow
import React from "react"
import Hoverable from "../../modules/Hoverable"
import Focusable from "../../modules/Focusable"
import Touchable from "../../modules/Touchable"
type PropsType = {
children?: React$Element<any>,
import path from "path"
import webpack from "webpack"
import ExtractTextPlugin from "extract-text-webpack-plugin"
import { phenomicLoader } from "phenomic"
import PhenomicLoaderFeedWebpackPlugin
from "phenomic/lib/loader-feed-webpack-plugin"
import pkg from "./package.json"
import remark from "remark"
import slug from "remark-slug"
import autoLinkHeadings from "remark-autolink-headings"
import highlight from "remark-highlight.js"
import toc from "remark-toc"
import html from "remark-html"
function mdify(text) {
return remark()
// https://github.com/wooorm/remark-slug
@MoOx
MoOx / Hoverable.js
Created September 29, 2016 08:53
Hoverable HoC for React components
// @flow
import React, { Component } from "react"
type Props = {
onMouseEnter?: Function | boolean,
onMouseLeave?: Function | boolean,
}
type State = {
@MoOx
MoOx / compo.js
Created September 24, 2016 03:55
Class method with this and no bind or no fat arrow in render
import React, { Component } from "react"
class Test extends Component {
handleThing = () => {
this.setState({
// ...
})
};
render() {
@MoOx
MoOx / .flowconfig
Created September 22, 2016 13:39
some flowconfig
[version]
0.30.0
[ignore]
.*/.git/.*
.*/node_modules/.*
.*/.nyc_output/.*
.*/__tests__/.*
.*/dist/.*
@MoOx
MoOx / solution1.js
Created September 8, 2016 22:16
avoid "windows is undefined" error when in node for React component
import React, { Component } from "react"
import styles from "./index.css"
export default class Hero extends Component {
componentDidMount() {
if (typeof window !== "undefined") {
require("particles.js").particlesJS.load("particles-js", "assets/particles.json", function() {
console.log("callback - particles.js config loaded")