Skip to content

Commit

Permalink
Getting ready
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyBradshaw7 committed Sep 23, 2021
1 parent 35ffcfe commit 43d5b7c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 160 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
Jeremy Bradshaw:

This is some sample React Native code from our main repository, just enough to give some insights into my coding style, but not enough to expose any company IP. The package.json shows what packages I've been using - basically we make heavy use of Redux for
This is some sample React Native code from our main repository, just enough to give some insights into my coding style,
but not enough to expose any company IP. The package.json shows what packages I've been using - we make heavy use of Redux for
application state (though lately I've been making more use of context and react-native-query where previosuly I'd have resorted
to Redux), and react-navigation for routing. Some of the older components and screens are class-based, but all new
components I write are functional components with hooks.
to Redux), and react-navigation for routing. Some of the older components and screens are class-based so you may see examples of
those, but all new components are written as functional components (with hooks).

NB. In almost 4 years of programming with RN I Haven't yet hit a scenario where I need to write native modules for ios/android, so
I cannot claim to have any knowledge or experience of that, though I'm keen to dive in and investigate that at the first opportunity.

The components folder illustrates some work I have done with animations, though as that's not really the focus of our app it's only
very basic.

Original README from repo follows:

# ccf

Expand Down
10 changes: 0 additions & 10 deletions build-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@
# versionCode is an integer which Google Playstore recognises and does not allow to upload another APK having the same value. Just think of this as build number.
# versionName is the version number of your application and visible in Google Play Store. Can use server format.
# See https://saumya.github.io/ray/articles/72/
#
# Note: requires innoved-ccf.keystore to be stored somewhere securely, outside version control, and placed in
# ./android/app folder on any build machine. Curently stored in mail attachment between me, simon & [email protected]
# Also need ./android/gradle.properties file containing:
# android.useDeprecatedNdk=true
# MYAPP_RELEASE_STORE_FILE=innoved-ccf.keystore
# MYAPP_RELEASE_KEY_ALIAS=innoved-ccf
# MYAPP_RELEASE_STORE_PASSWORD=innoved123
# MYAPP_RELEASE_KEY_PASSWORD=innoved123
# Currently we need both in the repo to be able to automate a build via AppCenter.

ENV=$1

Expand Down
144 changes: 1 addition & 143 deletions build-ios.sh

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Text.render = function (...args) {
// assuming we use a dark header, we re-evaluate this after setting branding
StatusBar.setBarStyle('light-content', true);

// Initialise Sentry:
if (!__DEV__ || ErrorService.LogOnDevelopment) {
// see https://docs.sentry.io/clients/javascript/config/
Sentry.init({
Expand Down
Binary file not shown.
3 changes: 1 addition & 2 deletions src/appstate/activityLogs/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { IEMSLearnerMap } from './models';

/**
* Selector to feed subscribing components with Activity Log learners
* Selectors control which state updates get pushed to components via mapStateToProps, and therefore avoids any unnecessary
* re-rendering.
* Selectors control which state updates get pushed to components via mapStateToProps, to avoid any unnecessary re-rendering.
*
* @return {IEmsLearner[]} Sorted learner array
*/
Expand Down
4 changes: 2 additions & 2 deletions src/services/Util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export default class Util {
}

/**
* Array nvl
* Array nvl - if first array is empty take second
*/
public static anvl(val1: any[], val2: any[]): any[] {
return val1.length > 0 ? val1 : val2;
Expand Down Expand Up @@ -313,7 +313,7 @@ export default class Util {
}

/**
* @description Groups items from an array into an array of objects, grouped by a property 'prop' name, maintaining original order. Based on functionality of LoDash's 'groupBy' function, but, unlike LoDash, preserves original array's order and returns an array instead of an object.
* Groups items from an array into an array of objects, grouped by a property 'prop' name, maintaining original order. Based on functionality of LoDash's 'groupBy' function, but, unlike LoDash, preserves original array's order and returns an array instead of an object.
*
* @param arr {array of objects} - Objects within array should contain a property marked by the 'prop' argument, or else they will be excluded from the output and a warning will be logged.
* @param prop {string} Propery to use for grouping. The value of this will be converted to a string when creating group names.
Expand Down

0 comments on commit 43d5b7c

Please sign in to comment.