General tools we use to build React Native applications.
npm install --save react-native-app-helpers
import { createTextComponent } from "react-native-app-helpers";
- Aligned
- Column
- ContainerFillingKeyboardAvoidingView
- ContainerFillingScrollView
- createBottomTabBarComponent
- createButtonComponent
- createCardComponent
- createCheckboxComponent
- createCreatableSelectComponent
- createFileStoreManagerComponent
- createFiniteStateMachineRoutingComponent
- createFixedHeightComponent
- createFixedWidthComponent
- createFlashMessageComponent
- createFlatColorBackgroundComponent
- createFullHeightPopoverComponent
- createHeaderBodyFooterComponent
- createHeaderComponent
- createHorizontalSplitButtonComponent
- createHrComponent
- createImageBackgroundComponent
- createInputComponent
- createLimitedHeightComponent
- createLimitedWidthComponent
- createMigratorManagerComponent
- createMinimumHeightComponent
- createMinimumWidthComponent
- createNullableEmailInputComponent
- createNullableFloatInputComponent
- createNullableIntegerInputComponent
- createNullablePasswordInputComponent
- createNullableTextAreaComponent
- createNullableTextInputComponent
- createOfflineTableComponent
- createPaddingComponent
- createPickerButtonComponent
- createProportionalColumnComponent
- createProportionalRowComponent
- createRequiredEmailInputComponent
- createRequiredFloatInputComponent
- createRequiredIntegerInputComponent
- createRequiredPasswordInputComponent
- createRequiredTextAreaComponent
- createRequiredTextInputComponent
- createSearchableMultiSelectComponent
- createSearchableSelectComponent
- createSessionStoreManagerComponent
- createSidebarComponent
- createStackComponent
- createStackRoutingComponent
- createStateStoreManagerComponent
- createStatusFillComponent
- createTabRoutingComponent
- createTextComponent
- createTiledComponent
- createUnderlinedTopTabBarComponent
- createVerticalSplitButtonComponent
- Hitbox
- HorizontallySymmetricalSafeAreaView
- Row
- SimpleModal
- SizedHorizontallySymmetricalSafeAreaView
- useBackButton
- useEventRefresh
- useMeasure
- useRefresh
- useStartSyncWhenTop
- useSyncFileCleanUpBlocker
- useSyncInProgress
- abortControllerFactory
- errorReporter
- FileStore
- logger
- Migrator
- PermissionHelper
- PictureHelper
- Request
- SessionStore
- StateStore
- Sync
- SyncableStateHelper
- SyncController
- UuidGenerator
- AbsentSyncableStateSingleton
- AwaitingPullSyncableStateCollectionItem
- AwaitingPushSyncableStateCollectionItem
- BasicTableColumn
- BorderStyle
- BottomTab
- BottomTabBarProps
- BottomTabBarStyle
- BottomTabBarStyleState
- ButtonProps
- ButtonStateStyle
- ButtonStyle
- CardProps
- CheckboxProps
- CheckboxStateStyle
- CheckboxStyle
- ControlStateStyle
- ControlStyle
- CreatableSelectProps
- CustomElementTableColumn
- CustomTextTableColumn
- EmptyRequestBody
- FileRequestBody
- FiniteStateMachineRouterState
- FiniteStateMachineRoutingProps
- FixedHeightProps
- FixedWidthProps
- FlashMessageProps
- FlashMessageState
- FlashMessageStyle
- FlatColorBackgroundProps
- HeaderBodyFooterProps
- HeaderIcon
- HeaderProps
- HeaderStyle
- ImageBackgroundProps
- Json
- JsonRequestBody
- KeyableTableCell
- LimitedHeightProps
- LimitedWidthProps
- MigratableState
- MigrationList
- MigratorInterface
- MinimumHeightProps
- MinimumWidthProps
- NonKeyableTableCell
- NullableEmailInputProps
- NullableFloatInputProps
- NullableIntegerInputProps
- NullablePasswordInputProps
- NullableTextAreaProps
- NullableTextInputProps
- OfflineTableData
- OfflineTableProps
- PaddingProps
- PreflightResponse
- PreflightResponseCollection
- PreflightResponseCollectionItem
- PreflightResponseSingleton
- ProportionalColumnProps
- ProportionalRowProps
- PushingSyncableStateCollectionItem
- QueryParameter
- QueryParameters
- RequiredEmailInputProps
- RequiredFloatInputProps
- RequiredIntegerInputProps
- RequiredPasswordInputProps
- RequiredTextAreaProps
- RequiredTextInputProps
- Route
- RouteParameters
- RouteTable
- SearchableMultiSelectProps
- SearchableSelectProps
- SidebarProps
- SortDirection
- SplitButtonStateStyle
- SplitButtonStyle
- SplitButtonTypeStyle
- StackRoute
- StackRouteProps
- StackRouterState
- StackRouteTable
- StackRoutingProps
- StackStateItem
- StatusPillProps
- StatusPillStyle
- StatusPillStyleStatus
- SvgIcon
- SyncableSchema
- SyncableState
- SyncableStateCollection
- SyncableStateCollectionItem
- SyncableStateSingleton
- SyncConfiguration
- SyncConfigurationCollection
- SyncPullResponse
- TableColumn
- TableRow
- TableRowStyle
- TableSchema
- TableStyle
- TabRoute
- TabRouteTable
- TabRoutingProps
- TextProps
- UnderlinedTopTab
- UnderlinedTopTabBarProps
- UnderlinedTopTabBarStyle
- UnderlinedTopTabBarStyleState
- UpToDateSyncableStateCollectionItem
- UpToDateSyncableStateSingleton
- AbortControllerFactoryInterface
- ErrorReporterInterface
- FileStoreInterface
- LoggerInterface
- PermissionHelperInterface
- PictureHelperInterface
- RequestInterface
- StateStoreInterface
- SyncControllerInterface
- SyncInterface
- SyncState
- UuidGeneratorInterface
- flattenRenderedToArray
- getRenderedKey
- intercalateRendered
- isRenderedByReact
- nop
- setRenderedKey
- showSettingsScreen
- unwrapRenderedFunctionComponent
Most components here are wrapped in a factory method which is passed all information which is not expected to change at runtime. This allows for heavy caching of styles which should help improve performance (see the React Native documentation).
To use them, you would do something similar to the following:
import { createTextComponent } from "react-native-app-helpers";
const ExampleText = createTextComponent(`example`, `red`, 12, `left`, false);
const ExampleScreen = () => (
<ExampleText>
Hello World! (in the "example" font, in red, at size 12, left-aligned)
</ExampleText>
);
All components herein which render text apply a line-height of 1.4x the font size. This is done to ensure consistent rendering between iOS and Android, the latter of which defaults to having more space beneath text than above.
No components are to include any external padding or spacing as this is quite often a contextual matter. Instead, use wrapping components (which provide internal padding/spacing).
As few components as possible rely on any form of internal state; where possible (and practical) all state is passed in via props, and changes are suggested to the parent component through callbacks (also provided via props). This makes components far more reusable.
composer require jameswilddev/react-native-app-helpers