This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Why is any so important? | |
* | |
* > Non-function members of the interfaces should be unique. If they are not unique, | |
* they must be of the same type. The compiler will issue an error if the interfaces | |
* both declare a non-function member of the same name, but of different types. | |
* @see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-interfaces | |
* | |
* Docs | |
* @see https://www.typescriptlang.org/docs/handbook/declaration-merging.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... other settings in your .bash_profile | |
# aliases | |
alias gpu='echo ""; cat ~/push.txt; git push; echo "";' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* custom ellipsize typings - tested with [email protected] | |
*/ | |
declare module 'ellipsize' { | |
/** | |
* @param text text to ellipsize | |
* @param maxLength of the text before it is ellipsized | |
* @param options | |
*/ | |
function ellipsize( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
const App = () => { | |
const containerRef = useRef<HTMLDivElement | null>(null) | |
return ( | |
<div ref={containerRef} {...useScrollDrag(containerRef)}> | |
{ /* content */ } | |
</div> | |
) |
Developing an app to accompany our website, worried that we would lose people in the transition if they couldn't remember their password, we were looking to make our app do Password AutoFill, a feature in iOS.
A talk from WWDC introducing the feature: https://developer.apple.com/videos/play/wwdc2017/206/
It works well, but there were a few bumps in the road making it work for React Native on Expo, so here are some notes to help out.
Apple's docs are here: https://developer.apple.com/documentation/security/password_autofill and they say something like this:
This is our custom implementation of the Inline Tool "Link" with a target
and title
attribute.
--> used and tested with @editorjs/[email protected]