Utilities and UI components for cross-platform React Native apps
0

Configure Feed

Select the types of activity you want to include in your feed.

28 1 0

Clone this repository

https://tangled.org/thehale.dev/react-native-expressive https://tangled.org/did:plc:lo6u33rzlsaoblakva6tfqss
git@tangled.org:thehale.dev/react-native-expressive git@tangled.org:did:plc:lo6u33rzlsaoblakva6tfqss

For self-hosted knots, clone URLs may differ based on your setup.



README.md

React Native Expressive#

Utilities and UI components for cross-platform React Native apps

Purely Personal Joseph Hale's software engineering blog

Installation#

npm install react-native-expressive
Submodule Usage

This library can also be used as a Git Submodule, which can enable hot reloading of library codes changes.

The tradeoff is the host app is then responsible for including the library's dependencies directly within the host's package.json and configuring any needed aliases to resolve library items from the submodule path.

Install the submodule

git submodule add https://github.com/thehale/react-native-expressive.git lib/react-native-expressive

Install the submodule's dependencies

node ./lib/react-native-expressive/script/install-dependencies-in-host.js

Configure Aliases

babel.config.js

module.exports = {
  plugins: [
+    [
+      'module-resolver',
+      {
+        extensions: ['.ios.js', '.android.js', '.ios.jsx', '.android.jsx', '.js', '.jsx', '.json', '.ts', '.tsx'],
+        root: ['.'],
+        alias: {
+          'react-native-expressive': './lib/react-native-expressive/src',
+        },
+      },
+    ]
  ]
}

tsconfig.json

{
  "compilerOptions": {
    "paths": {
+      "react-native-expressive": ["./lib/react-native-expressive/src"]
    }
  }
}
TIP

You may have to npx react-native clean the Metro and npm caches followed by an app reinstall.

TIP

Make sure your react-native-expressive submodule does NOT have a node_modules folder as that can break Metro's module resolution.

Usage#

See the example app

Contributing#

License#

Copyright (c) 2025 Joseph Hale, All Rights Reserved

Provided under the terms of the Mozilla Public License, version 2.0

What does the MPL-2.0 license allow/require?

TL;DR#

You can use files from this project in both open source and proprietary applications, provided you include the above attribution. However, if you modify any code in this project, or copy blocks of it into your own code, you must publicly share the resulting files (note, not your whole program) under the MPL-2.0. The best way to do this is via a Pull Request back into this project.

If you have any other questions, you may also find Mozilla's official FAQ for the MPL-2.0 license insightful.

If you dislike this license, you can contact me about negotiating a paid contract with different terms.

Disclaimer: This TL;DR is just a summary. All legal questions regarding usage of this project must be handled according to the official terms specified in the LICENSE file.

Why the MPL-2.0 license?#

I believe that an open-source software license should ensure that code can be used everywhere.

Strict copyleft licenses, like the GPL family of licenses, fail to fulfill that vision because they only permit code to be used in other GPL-licensed projects. Permissive licenses, like the MIT and Apache licenses, allow code to be used everywhere but fail to prevent proprietary or GPL-licensed projects from limiting access to any improvements they make.

In contrast, the MPL-2.0 license allows code to be used in any software project, while ensuring that any improvements remain available for everyone.


Made with create-react-native-library