App
The entry file for Ray applications defaults to src/app.js. Different from the app.js for native MiniApps, this app.js for Ray is a React component.
src/app.js
App configuration
Ray applications are configured using src/global.config.js, corresponding to the app.json for native MiniApps.
When Ray is built, it will automatically select the configuration according to the target platform to be built. If there are no adaptation requirements for other ends, you can just keep export const tuya = {}.
Lifecycle
You can write the application lifecycle directly in the app component.
For functional components, you can use the useAppEvent hook to listen for the lifecycle.