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 React, { useContext } from "react"; | |
import { createContext } from "react"; | |
export const contextFactory = <TParams, TStore>(useStore: (args: TParams) => TStore) => { | |
const Context = createContext<TStore>(null as TStore); | |
const useStoreContext = () => useContext(Context); | |
const Provider = ( | |
props: |
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
// Callback | |
const asyncPowWithCallback = (arg1, timeout, callback: (error, value) => void) => { | |
setTimeout(() => { | |
callback(null, arg1*arg1); | |
}, timeout); | |
} | |
const value = asyncPowWithCallback(2, 100, (error, value) => { | |
console.log("value1"); | |
}); |
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
/* | |
WallabyJS React Native Config | |
Works well with Jest + Enzyme | |
*/ | |
/* eslint-disable */ | |
module.exports = function (wallaby) { | |
return { | |
files: [ | |
'src/**/*.js', |
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
diff --git a/node_modules/typeorm/persistence/subject-builder/OneToManySubjectBuilder.js b/node_modules/typeorm/persistence/subject-builder/OneToManySubjectBuilder.js | |
index 43fb09e..b62e654 100644 | |
--- a/node_modules/typeorm/persistence/subject-builder/OneToManySubjectBuilder.js | |
+++ b/node_modules/typeorm/persistence/subject-builder/OneToManySubjectBuilder.js | |
@@ -145,10 +145,11 @@ var OneToManySubjectBuilder = /** @class */ (function () { | |
parentSubject: subject, | |
canBeUpdated: true, | |
identifier: removedRelatedEntityRelationId, | |
- changeMaps: [{ | |
- relation: relation.inverseRelation, |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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 React from 'react'; | |
import { Image, Text, View } from 'react-native'; | |
function renderImage(node: any, output: any, state: any, styles: any) { | |
const { imageWrapper: wrapperStyle, image: imageStyle } = styles; | |
/** | |
* Prevent Native crash (View in Text) from occuring | |
*/ | |
if (state.inline) { |
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
class LoopbackApp { | |
private static instance: Promise<any>; | |
private constructor() {} | |
public static get app(): Promise<any> { | |
if (LoopbackApp.instance) return LoopbackApp.instance; | |
LoopbackApp.instance = new Promise((resolve, reject) => { | |
resolve(); |
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 | |
import React, { PureComponent } from 'react'; | |
import { View, StyleSheet } from 'react-native'; | |
import { VictoryChart, VictoryArea, VictoryAxis, VictoryScatter } from 'victory-native'; | |
import { BackendTimestampConverter } from 'homefriend/src/services'; | |
import appStyle from 'homefriend/src/appStyle'; | |
type PropsType = { | |
consumptionHistory: DayConsumptionBackendDataType[], |
NewerOlder