Skip to content

Instantly share code, notes, and snippets.

View tblaisot's full-sized avatar

Thomas Blaisot tblaisot

View GitHub Profile
@tblaisot
tblaisot / sample.adoc
Created March 20, 2019 18:07
Custom adoc extension

For exemple i would like to do a custom slideshow block and have image macro render

slideshow
slide2

Should render

<div …​>

@tblaisot
tblaisot / patch-react-functionnal-component.js
Created May 10, 2017 07:06
Monkey patching of React to automagicly use functionnal components as functions
/*
Monkey patching of React to automagicly use functionnal components as functions for a real gain in perforance
See article "https://medium.com/missive-app/45-faster-react-functional-components-now-3509a668e69f"
WARNING: do not use if you don't understand what you are doing and the conséquences of such patching
*/
function patchReactForFunctionnalComponent(React) {
React.Component.prototype.__is_react_component__ = true;
var ReactcreateElement = React.createElement;
React.createElement = function (type, config, children) {