@kbach/react-native 1.0.0-beta.1 → 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +36 -1
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -19,7 +19,12 @@ npm install @kbach/react-native
19
19
  That pulls in [`@kbach/android`](https://www.npmjs.com/package/@kbach/android)
20
20
  too — the actual native module — as a real dependency. Android's
21
21
  autolinking discovers it automatically the moment it's in `node_modules`;
22
- no manual `MainApplication.kt` edit needed.
22
+ no manual `MainApplication.kt` edit needed. Works the same way whether
23
+ your app was created with the React Native CLI or with Expo — **except
24
+ Expo Go**, which can never load this (or any) custom native module; see
25
+ below.
26
+
27
+ ### React Native CLI
23
28
 
24
29
  Add the Babel plugin so your app's JSX routes through Kbach's JSX runtime
25
30
  instead of `react/jsx-runtime`:
@@ -41,6 +46,36 @@ one needs (a plain single-app install doesn't need any of that — it's
41
46
  only relevant if you're linking packages locally instead of installing
42
47
  from npm).
43
48
 
49
+ ### Expo
50
+
51
+ **Expo Go doesn't work** — it's a fixed pre-built binary with no way to
52
+ load a custom native module like `@kbach/android`. You need a **dev
53
+ client** instead (a custom build of your app with this module baked in) —
54
+ functionally the same "real native project" setup as the CLI path above,
55
+ just generated and driven through Expo's own tooling:
56
+
57
+ ```js
58
+ // babel.config.js
59
+ module.exports = {
60
+ presets: ['babel-preset-expo'], // not '@react-native/babel-preset'
61
+ plugins: ['@kbach/react-native/babel-plugin'],
62
+ };
63
+ ```
64
+
65
+ ```sh
66
+ npx expo prebuild # generates android/ (and ios/, which this package doesn't support yet)
67
+ npx expo run:android # builds and installs a dev client with the native module included
68
+ ```
69
+
70
+ Also requires the New Architecture enabled (Expo's default in current SDK
71
+ versions) — `@kbach/android` is a TurboModule, which doesn't exist under
72
+ the legacy bridge at all. If you're on an older SDK/config with the New
73
+ Architecture off, turn it on in `app.json`
74
+ (`"newArchEnabled": true` under `expo`) before prebuilding.
75
+
76
+ EAS Build works the same way — it runs the same `prebuild` step, so no
77
+ extra configuration beyond the two steps above.
78
+
44
79
  ## What this is
45
80
 
46
81
  - A JSX runtime (`@kbach/react-native/jsx-runtime`) that intercepts
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@kbach/react-native",
3
- "version": "1.0.0-beta.1",
4
- "description": "Kbach's utility-class styling engine for React Native — the same class names as @kbach/react, resolved to a StyleSheet-ready style object via a Kotlin/JNI TurboModule. Beta, Android-only.",
5
- "keywords": ["css", "react-native", "tailwind", "utility-first", "styling", "android"],
3
+ "version": "1.0.0-beta.2",
4
+ "description": "Kbach's utility-class styling engine for React Native — the same class names as @kbach/react, resolved to a StyleSheet-ready style object via a Kotlin/JNI TurboModule. Beta, Android-only. Works with the React Native CLI or an Expo dev client (not Expo Go).",
5
+ "keywords": ["css", "react-native", "expo", "tailwind", "utility-first", "styling", "android"],
6
6
  "license": "MIT",
7
7
  "author": "semsakadanupol",
8
8
  "repository": {