var state = {
id: 1,
points: 100,
name: "Goran"
};
var newState = {
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
| public CustomView(Context context, AttributeSet attrs) { | |
| super(context, attrs); | |
| setupBackPressed(); | |
| } | |
| public static void addMe(Activity host) { | |
| NotificationView v = (NotificationView) host.getLayoutInflater().inflate(R.layout.notification_list, null); | |
| LinearLayout.LayoutParams p = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); | |
| host.addContentView(v, p); |
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
| 'use-strict' | |
| var React = require('react-native'); | |
| var { | |
| Dimensions | |
| } = React; | |
| var DimensionsHelper = { | |
| init : function() { | |
| this.SCREEN_WIDTH = Dimensions.get("window").width; |
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
| /*! webpack.config.js | Build JS, CSS,.. client assets and StyleGuide */ | |
| 'use strict'; | |
| var webpack = require('webpack'); | |
| var ExtractTextWP = require('extract-text-webpack-plugin'); | |
| var HtmlWP = require('html-webpack-plugin'); | |
| var path = require('path'); | |
| var moment = require('moment'); |
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
| #!/bin/bash | |
| # --------------------------------------------------------- | |
| # Customizable Settings | |
| # --------------------------------------------------------- | |
| MOUNT_POINT="${CASE_SAFE_MOUNT_POINT:-${HOME}/casesafe}" | |
| VOLUME_PATH="${CASE_SAFE_VOLUME_PATH:-${HOME}/.casesafe.dmg.sparseimage}" | |
| VOLUME_NAME="${CASE_SAFE_VOLUME_NAME:-casesafe}" | |
| VOLUME_SIZE="${CASE_SAFE_VOLUME_SIZE:-60g}" |
Why this transform is necessary?
Until React Native 24, you import React from 'react-native' package, but this will change on RN 25, you will need to import React from 'react'. You probably have many files that does this, so I've created a codemod to save you a bunch of time
- Install jscodeshif
Hello there.
So, if you are here you probably saw my previous tweet where I asked for tips & tricks on improving the timing on an iOS/React Native app build time.
What will follow was how I mixed those suggestions + some good old GoogleSearch-fu + me deep diving on this for ~2 days.
OlderNewer