Skip to content

Instantly share code, notes, and snippets.

View kamiranoff's full-sized avatar
🐥
Junior Developer

Kevin Amiranoff kamiranoff

🐥
Junior Developer
  • Brains and Brawn Studio
  • London, UK
View GitHub Profile
@r0b0t3d
r0b0t3d / useCallback.md
Created July 10, 2021 09:06
Use of useCallback and useMemo

1. Use

1.1. in callback

const handlePress = useCallback(() => {
	// handle press
}, [])

Good 👍

<Button onPress={handlePress} />
@heron2014
heron2014 / useEffect-key-takeaways.js
Last active December 29, 2020 01:54
Key takeaways for useEffect
useEffect(fn) // run function on every render
useEffect(fn, []) // run function only when the component is first rendered
useEffect(fn, [value]) //run function when component is first rendered and when the `value` changes
// Remember if you pass dependency(value) which is an object - React perform
// strict comparision using "===" of the first level properties and will not
// conduct comparisons deeper into the properties.
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active April 15, 2024 09:41
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@heron2014
heron2014 / react-native-maps-enable-google-maps-instructions.md
Last active April 11, 2024 09:39
Visual instructions how to enable Google Maps on IOS using react-native-maps

Visual instructions how to enable Google Maps on IOS using react-native-maps

UPDATE: Following instructions are now a year old. I have recently managed to upgrade react-native-maps from 0.17 to the latest version 0.21 with react-native 0.51 - if you want to follow my instruction scroll down to the end this doc! Hope that will work for you too!

This is for my personal use, things might not be correctly explained here. For the official docs please check https://github.com/airbnb/react-native-maps

Steps from scratch:

1.react-native init GoogleMapPlayground

@MustafaHaddara
MustafaHaddara / _sudoku.swift
Last active August 5, 2018 15:41 — forked from kristopherjohnson/_sudoku.swift
Sudoku solver in Swift
/*
Copyright (c) 2015 Kristopher Johnson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions: