Device Name | Dev Size | Ratio | Real Size | WxH Prop |
---|---|---|---|---|
iPhone5s | 320x568 | 2 | 640x1136 | 0,56 |
iPhone6 | 375x667 | 2 | 750x1334 | 0,56 |
iPhone6 Plus | 414x736 | 3 | 1242x2208 | 0,56 |
iPhone6s | 375x667 | 2 | 750x1334 | 0,56 |
iPhone6s Plus | 414x736 | 3 | 1242x2208 | 0,56 |
iPhone7 | 375x667 | 2 | 750x1334 | 0,56 |
iPhone7 Plus | 414x736 | 3 | 1242x2208 | 0,56 |
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, { ReactChild } from 'react'; | |
import { Database } from '@nozbe/watermelondb'; | |
import { getWatermelon } from 'app/utils/DBWatermelonOld/DBWatermelonOld'; | |
import DatabaseProvider from '@nozbe/watermelondb/DatabaseProvider'; | |
const WatermelonProvider = (props) => { | |
const watermelonRef = React.useRef(); | |
const [database, setDatabase] = React.useState(); | |
if (!watermelonRef.current) { |
Hi! I'm trying to create this HOC
-like function in a React Native + TS project.
Now, although the CompA
goes all good, CompB
just doesn't work.
It just says Type 'FunctionComponent<ICompBProps>' is not assigname to type 'FunctionComponent<IProps>'.
Any suggestion about how to fix this?
interface IProps {
//...
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
export default function fixJestErrorStack(error: Error) { | |
if (error.stack) { | |
const lines: string[] = error.stack.split('\n'); | |
let indexToRemove = -1; | |
lines.forEach((line, index) => { | |
if (indexToRemove === -1 && line.match(new RegExp(/^\s+at /))) { | |
indexToRemove = index; | |
} | |
}); | |
if (indexToRemove >= 0) { |
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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* | |
* @format | |
* @flow | |
*/ | |
import React from 'react'; | |
import {View, TextInput, Text} from 'react-native'; |
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, { PureComponent } from "react"; | |
import PropTypes from "prop-types"; | |
import { Text } from "react-native"; | |
import { Colors } from "../../../Theme"; | |
export default class Label extends PureComponent { | |
render() { | |
const { | |
white, |
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
Moved to https://github.com/sidferreira/ReactNativeComponentsBenchmark |
NewerOlder