Skip to content

Instantly share code, notes, and snippets.

@keyz
keyz / shift_to_parentheses.json
Last active November 9, 2019 08:14 — forked from eyemyth/shift_to_parentheses.json
Complex modification rules for Karabiner Elements to map shift keys to parentheses. Use the URL in the comment to import easily.
{
"title": "Single-hit shift to parentheses",
"rules": [
{
"description": "Map single-hit left shift to (",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_shift",
@keyz
keyz / react-refs-must-have-owner.md
Created May 30, 2016 01:59 — forked from jimfb/react-refs-must-have-owner.md
addComponentAsRefTo Invariant Violation

You are probably here because you got the following error messages:

addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's render method, or you have multiple copies of React loaded.

This usually means one of two things:

  • You are trying to add a ref to an element that is being created outside of a component's render() function.
  • You have multiple (conflicting) copies of React loaded (eg. due to a miss-configured NPM dependency)

Invalid Refs