Skip to content

Instantly share code, notes, and snippets.

@lpalmes
lpalmes / react.md
Last active May 7, 2021 17:59
React and Reconcilers in Reason

React

This is the base of all projects and it will include the foundation for all potential react-based projects in Reason.

This base package should include a ReasonReact api to promote collaboration and familiarity with people using a ReasonReact, and for the modern world of React this should also include a Hooks api that currently revery uses.

React module

All blocks in Jsx are of type React.reactElement. This reactElement should represent:

@lpalmes
lpalmes / jsxstyle.re
Created December 20, 2017 23:51
bs-jsxstyle bindings
module Box = {
[@bs.module "jsxstyle"] external box : ReasonReact.reactClass = "Box";
let make =
(
~azimuth: option(string)=?,
~background: option(string)=?,
~backgroundAttachment: option(string)=?,
~backgroundColor: option(string)=?,
~backgroundImage: option(string)=?,
~backgroundPosition: option(string)=?,
@lpalmes
lpalmes / App.js
Last active November 14, 2017 18:36
React Relay pseudo bindings
import { graphql } from 'react-relay'
const query = graphql`
query AppQuery(id: ID!) {
user(id: $id) {
id
name
}
}`
@lpalmes
lpalmes / server_middleware.go
Created April 28, 2017 12:07
Go middleware
package main
import (
"log"
"net/http"
"time"
)
func main() {
http.Handle("/", logging(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

Keybase proof

I hereby claim:

  • I am lpalmes on github.
  • I am lpalmes (https://keybase.io/lpalmes) on keybase.
  • I have a public key ASD2U8rqfXd9T06RiiON79AaafKLPmTzdBBLxBfnhG7J2wo

To claim this, I am signing this object: