Skip to content

Instantly share code, notes, and snippets.

View heloa-net's full-sized avatar

heloa-net

View GitHub Profile
import { PersistGate } from 'redux-persist/integration/react'
import { configureStore, checkVersions } from '@store/store'
...
const { store, persistor } = configureStore()
export default class App extends Component {
...
render() {
const { hideSplash } = this.props
return (
@danmakenoise
danmakenoise / test.js
Last active February 29, 2024 20:23
Unit Testing Children of React Context API Consumers with Enzyme
// Component.js
const Component = props => (
<MyContext.Consumer>
{(context) => (
<Foo
bar={props.bar}
baz={context.baz}
/>
)}
</MyContext.Consumer>
@Geoff-Ford
Geoff-Ford / master-javascript-interview.md
Last active October 15, 2024 11:51
Eric Elliott's Master the JavaScript Interview Series
@fdaciuk
fdaciuk / lazy-img.jsx
Last active December 8, 2022 18:38
React Lazy img load component
'use strict'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
class LazyImg extends Component {
constructor () {
super()
this.state = { loaded: false }
this.img = {}
// Place your settings in this file to overwrite the default settings
{
"editor.fontSize": 15,
"editor.fontFamily": "Consolas",
"editor.tabSize": 2,
"editor.wordWrapColumn": 80,
"editor.fontLigatures": true,
"editor.snippetSuggestions": "top",
"editor.minimap.enabled": true,
"files.exclude": {
@sibelius
sibelius / learning.md
Last active August 23, 2023 13:21
Learning Path React Native

Basics

  • Learn how to start a new react native project
  • Run it on ios simulator, on android emulator, on a real iPhone device and on a real Android device, with and without debugging enabled.
  • Learn how to upgrade a react native project
  • Learn how to add a package to the project
  • Learn how to add a package that has a native dependency (https://github.com/airbnb/react-native-maps, https://github.com/evollu/react-native-fcm) - DO NOT USE COCOAPODS
  • Learn how to use fetch to get data from your backend

Learn Navigation

@mdo
mdo / 00-intro.md
Last active November 7, 2024 10:13
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

<html>
<head>
<title>API Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var accessToken = "<your agent's client access token>";
var baseUrl = "https://api.api.ai/v1/";
@StevenLangbroek
StevenLangbroek / 00_readme.md
Last active February 9, 2017 22:14
Validation for Redux-form

"Thunked" validation in redux-form

Validation in redux-form can be approached using many "schema-validation" libraries. I used validate.js, but ran into a restriction: we needed to validate user input differently based on other input in that same form. This is quite a common requirement for validation, and was surprisingly elegant to solve in redux-form.

small caveat: not adapted for redux-form 6

Libraries used: