| 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 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
| function flatten_es5(items) { | |
| if (!items || !Array.isArray(items)) { | |
| return [] | |
| } | |
| var flattened = [] | |
| for(var value of items) { | |
| if (Array.isArray(value)) { | |
| flattened = flattened.concat(flatten_es5(value)) | |
| } else { | |
| flattened.push(value) |
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
| Moved to https://github.com/sidferreira/ReactNativeComponentsBenchmark |
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, { 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 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
| /** | |
| * 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 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
| 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) { |
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 {
//...OlderNewer