react-native v0.48.4 is tested working
- on other-project, run
npm link
- on main-project, run
npm link other-project
- add file
rn-cli-config.js
to main-project
var path = require('path');
var blacklist = require('metro-bundler/src/blacklist');
appcenter login
"name": "GNCUAT",
in package.json"react-native": "0.0.0",
to dependencies in package.jsonappcenter codepush release-react -a Branding-Brand/GNCIOS -d Latest
type typeA = { a: string }; | |
type typeB = { b: string }; | |
type typeAorB = typeA | typeB; | |
// type check for union type | |
function isA(foo: typeA | typeB): foo is typeA { | |
return (<typeA>foo).a !== undefined; | |
} | |
// usage |
to update react-native in BBRN:
bbrn
react-native-git-upgrade 0.54.0
compile(project(':react-native-device-info')){ | |
exclude group: 'com.google.android.gms', module: 'play-services-gcm' | |
} | |
compile 'com.google.android.gms:play-services-gcm:9.8.0' | |
compile project(':react-native-maps') |
id imageInsets = tabItemLayout[@"props"][@"iconInsets"];
if (imageInsets && imageInsets != (id)[NSNull null])
{
id topInset = imageInsets[@"top"];
id leftInset = imageInsets[@"left"];
id bottomInset = imageInsets[@"bottom"];
id rightInset = imageInsets[@"right"];
CGFloat top = topInset != (id)[NSNull null] ? [RCTConvert CGFloat:topInset] : 0;
# change xcode project name from "BadNamedProject" to "GoodNamedProject" | |
# change code | |
grep -r 'BadNamedProject' -l --null . | xargs -0 sed -i '' 's#BadNamedProject#GoodNamedProject#g' | |
# change filename | |
find . -depth -name "*BadNamedProject*" -execdir sh -c 'mv {} $(echo {} | sed "s/BadNamedProject/GoodNamedProject/")' \; | |
function injectCSS(css) { | |
var style = document.createElement('style'); | |
style.innerHTML = css; | |
document.head.appendChild(style); | |
} | |
document.addEventListener('DOMContentLoaded', function() { | |
injectCSS('.header-widget {display: none}') |
function highlightStr(name, query) { | |
if (!query) | |
return [ | |
{ | |
str: name, | |
isHighlight: false | |
} | |
]; | |
const queryRegx = new RegExp(query, "ig"); |