This file contains 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
// store/pokemon.store.js | |
import { | |
get, | |
computed, | |
action, | |
makeAutoObservable, | |
createTransformer, | |
} from "mobx"; | |
class PokemonStore { |
This file contains 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 { observable } from 'mobx' | |
import { observer } from 'mobx-react' | |
const store = observable({ | |
prop1: 1, | |
prop2: 2, | |
... | |
}) | |
function ComponentA () { |
This an ordered version of the original gist located at https://gist.github.com/marcanuy/06cb00bc36033cd12875
- -aa
- aa-
- -ab
This file contains 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
// Bound Actions | |
import { observable } from "mobx"; | |
class Counter { | |
@observable count = 0; | |
@action.bound | |
increment() { | |
this.count++; | |
} | |
} | |
const counter = new Counter(); |
This file contains 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
// @flow | |
type ResolvedScalar = string | number | boolean | null; | |
type ResolvedValue = | |
| ResolvedScalar | |
| Array<ResolvedValue> | |
| {[key: string]: ResolvedValue}; | |
type ResolverFunction = (...args: Array<any>) => ResolvedValue; | |
export type ResolverMap = { |
This file contains 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 UIKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
let window = UIWindow(frame: UIScreen.main.bounds) |
This file contains 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
--- | |
Description: AWS AppSync Notes API | |
Parameters: | |
APIName: | |
Type: String | |
Description: Name of the API - used to generate unique names for resources | |
MinLength: 3 | |
MaxLength: 20 | |
AllowedPattern: '^[a-zA-Z][a-zA-Z0-9_]*$' |
This file contains 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 Foundation | |
public class Storage { | |
fileprivate init() { } | |
enum Directory { | |
// Only documents and other data that is user-generated, or that cannot otherwise be recreated by your application, should be stored in the <Application_Home>/Documents directory and will be automatically backed up by iCloud. | |
case documents | |
NewerOlder