I wanted to build something like Eventbrite for nearby activities. Someone could find an event, see what people were saying about it, and chat. For the first screen I needed a feed: an avatar, the organizer's name, a timestamp and a comment count. I wanted to write that card with the JSX component conventions I already knew. A harder question was how much of the code around the card could also run in a WeChat mini program.
What can an event card share with the web?
Sorting events by time is ordinary JavaScript. Grouping nearby coordinates into cells can be independent of the view as well. Rendering an image, scrolling through a feed, asking for a location or navigating to a detail page touches the host platform. I used that distinction to make sense of three approaches I looked at on April 13.1
| Approach | How I would write the screen | What I would test first |
|---|---|---|
| Taro with React | Compose JSX with Taro components such as View, Text and Image; use the platform APIs through Taro. | Open the same card on H5 and WeChat. Check event handling, navigation, scrolling and style support. |
| kbone with Preact | Start from a web-style component tree. kbone supplies a browser-like environment on the mini-program side. | Check every dependency that expects a DOM or a browser API. Inspect where web and WeChat navigation diverge. |
| uni-app | Use its Vue-oriented component and cross-platform API conventions. | Weigh platform coverage against rewriting the React-style view layer and learning another component ecosystem. |
The kbone Preact example made the boundary visible. Its counter uses one component, but the detail-page button chooses between wx.navigateTo and assigning location.href. That small example tells me more about portability than a list of supported targets. I also looked up WeUI and Linux development tools. Running a web preview and interacting with the result inside the mini-program environment answer different questions.2
Two failure messages, two places to look
In the afternoon I compared Taro with kbone, looked up Taro pitfalls, and opened NutUI and Taro UI. By 14:28 npm was resolving an actual career-partner installation. The dependency reports preserve two useful examples.3
| Symptom | What the report establishes | What I would inspect |
|---|---|---|
| React types disagree during Taro UI installation | The project had React 18 types. The selected React Native 0.79 dependency requested React 19 types through a peer relationship. | Read the chain in the npm report. Check which package introduced React Native and which target I actually need. |
| Taro packages disagree about the runtime | A Taro React adapter at 3.6.36 required the corresponding 3.6 runtime, while the tree included 4.0.10. | Compare the framework adapter, runner, test utilities and runtime versions before trying to bypass peer checks. |
Between those attempts I twice searched for “The entry point "preact" cannot be marked as external” and looked up the Preact Vite preset. I remember this as part of trying Taro. The two GitHub issues I opened describe similar errors for react. Treating an import as external tells the bundler to leave it for something else to provide; a configured entry still has to produce an output. To investigate a repeat, I would identify the active config, its entry and its external rules before changing presets. The surviving project configuration specifies React and Webpack 5. I have no build log tying the Preact message to that configuration or establishing a particular fix.43
What survived in the prototype
The working tree contains a Taro 4.0.10 project with React 18 and build scripts for both WeChat and H5. The home page imports Taro's primitives and maps mock posts into a feed. A minimal version of that component boundary looks like this:3
import { View, Text } from '@tarojs/components'
function ActivityCard({ activity, onOpen }) {
return (
<View onClick={()=> onOpen(activity.id)}>
<Text>{activity.title}</Text>
<Text>{activity.commentCount} comments</Text>
</View>
)
}
This is an adapted example. Passing an ID out of the card lets the page choose how to navigate. The same principle applies to location: the page can obtain coordinates from the platform, while a plain function decides which neighboring cells to query. On April 14 I asked how to find first- and second-degree neighbors of a block, including what Manhattan distance would mean in units of one block. A cell query gives candidate events; a feature promising a geographic radius would also have to check actual distances.3
The page I can inspect shows the feed and a comment affordance. I also ran into a much smaller problem than framework selection: styles.index came back undefined, and I tried styles expressed in JavaScript. Comments and chat were product goals. What I took away from this experiment was a concrete unit to port next time: one populated card, its navigation, and one platform interaction, before bringing in a complete UI kit.
References
Footnotes
-
NervJS contributors. (n.d.). Taro. GitHub. Supported frameworks and targets. DCloud. (n.d.). uni-app. Framework overview. ↩
-
WeChat Mini Program team. (n.d.). kbone-template-preact. GitHub, counter and quick-start sections. Web and mini-program entry points. Tencent. (n.d.). kbone. Implementation overview. ↩
-
Cai, B. (2025, April 13–14). career-partner [Local development materials]. Taro configuration and manifest, home page, npm dependency-resolution reports at 14:28 and 14:45 on April 13, and Cursor exchanges about the feed, styles and neighboring cells. The Preact error wording is from the April 13 searches. ↩ ↩2 ↩3 ↩4
-
Preact contributors. (n.d.). preset-vite. GitHub. Preact preset. Module Federation contributors. (n.d.). The entry point “react” cannot be marked as external [Issue 16]. Related issue opened during the investigation. ↩