Skip to content

Instantly share code, notes, and snippets.

View rlamtabbet's full-sized avatar

Rachid Lamtabbet rlamtabbet

  • Washington, D.C. metropolitan area
View GitHub Profile
@gaearon
gaearon / connect.js
Last active November 14, 2024 08:35
connect.js explained
// connect() is a function that injects Redux-related props into your component.
// You can inject data and callbacks that change that data by dispatching actions.
function connect(mapStateToProps, mapDispatchToProps) {
// It lets us inject component as the last step so people can use it as a decorator.
// Generally you don't need to worry about it.
return function (WrappedComponent) {
// It returns a component
return class extends React.Component {
render() {
return (
@jdthorpe
jdthorpe / kld.d.ts
Created August 12, 2018 17:16
A stub with some typescript typings for kld-intersections and kld-path-parser
declare module "kld-intersections" {
class Shape {}
export class Point2D {
constructor(x:number,y:number)
}
class Bezier2 extends Shape {
@typpo
typpo / BCP47-locales.md
Last active November 11, 2024 13:35
BCP 47 language tags
Language Tag Language Region Description
ar-SA Arabic Saudi Arabia Arabic (Saudi Arabia)
bn-BD Bangla Bangladesh Bangla (Bangladesh)
bn-IN Bangla India Bangla (India)
cs-CZ Czech Czech Republic Czech (Czech Republic)
da-DK Danish Denmark Danish (Denmark)
de-AT German Austria Austrian German
de-CH German Switzerland "Swiss" German
de-DE German Germany