Skip to content

Instantly share code, notes, and snippets.

View smontlouis's full-sized avatar

Montlouis-Calixte Stéphane smontlouis

  • Freelance
  • Annecy
View GitHub Profile
@XeeD
XeeD / README.md
Last active September 1, 2016 15:54
Este.js and react-transmit

Data fetching for Este with react-transmit

1) Without server rendering

Read the DOCS.

This is easy and straightforward. All you need is to add react-transmit into dependencies (npm install --save react-transmit). Transmit works as a Higher-order component so instead of

export default class Dashboard extends PureComponent {
 // ...
@XOP
XOP / ft2014_review.md
Last active September 5, 2016 09:58
Front-Trends 2014 extended review with links and stuff

DISCLAIMER:
The whole content comes "as is".
All commentaries refer to author's impression.
Some inconsistency possible as well.
The few details (mainly useful links) were added while transcribing notes.


@lurkmoophy
lurkmoophy / clientquestions.md
Last active November 27, 2016 16:51
A List of Questions for a Potential Client

Client Questions

An open source list of questions to ask your client/potential clients before kicking off a project by Luke Murphy.

  • Originally published: 25/02/2014

Technical

  • Who is responsible for content in your organisation?
/**
* @providesModule PatientList
*/
import NavigationBar from 'react-native-navbar';
import NavigationButtons from 'NavigationButtons';
import React, { ListView, Navigator, StyleSheet, Text, TextInput, TouchableHighlight, View } from 'react-native';
import { connect } from 'react-redux/native'
@connect(state => ({
patients: state.patients
@RReverser
RReverser / better-console-log.js
Last active May 9, 2019 21:07
Better console.log in Node
// UPD:
// Now available as npm module!
// Check out https://github.com/RReverser/better-log for details.
console.log = (function (log, inspect) {
return function () {
return log.apply(this, Array.prototype.map.call(arguments, function (arg) {
return inspect(arg, { depth: 1, colors: true });
}));
};
@gaearon
gaearon / combining.js
Created June 3, 2015 18:03
Combining Stateless Stores
// ------------
// counterStore.js
// ------------
import {
INCREMENT_COUNTER,
DECREMENT_COUNTER
} from '../constants/ActionTypes';
const initialState = { counter: 0 };
@VeraZab
VeraZab / LocalNotifications.js
Last active February 26, 2023 23:26
Simple local notification with Expo
import React, {Component} from 'react';
import {TextInput, View, Keyboard} from 'react-native';
import {Constants, Notifications, Permissions} from 'expo';
export default class Timer extends Component {
onSubmit(e) {
Keyboard.dismiss();
const localNotification = {
title: 'done',
@knowbody
knowbody / ex-navigation.md
Last active July 17, 2023 10:14
My exponent's ex-navigation docs/thoughts

Exponent - ex-navigation

This is for now, for my personal use only, things might not be correctly explained here. For the official docs please check: https://github.com/exponentjs/ex-navigation/blob/master/README.md

Navigation bar configuration

On every screen you can use the built-in navigation bar, you can add a title, left button, right button or change navigation bar’s style. All you need to do is pass appropriate params to navigationBar in the route configuration:

import React, { Component } from 'react';
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@nikasepiskveradze
nikasepiskveradze / react-query-lite.js
Last active March 11, 2024 17:45
Lightweight implementation of React Query
import React from "react";
const context = React.createContext();
export function QueryClientProvider({ children, client }) {
React.useEffect(() => {
const onFocus = () => {
client.queries.forEach((query) => {
query.subscribers.forEach((subscriber) => {
subscriber.fetch();