Preflight checklist
Component
packages/sparkling-sdk
What happened?
i pass some params to another page in android environment,but the new page can not get the params values by lynx.__globalProps.queryItems
Steps to reproduce
page A's codes:
navigate({
path: 'detail.lynx.bundle',
options: {
params: {
title:"caslkj",
isDarkMode1: true,
itemId1: "1223223",
hide_nav_bar: 1,
},
animated: true,
},
},
(res) => {
if (res.code !== 0) {
console.error('error:', res.msg);
}
});
detail's codes:
export function App(props: { onMounted?: () => void }) {
let [isDarkMode, setIsDarkMode] = useState(false)
let [itemId, setItemId] = useState("abc")
useEffect(() => {
console.info('Hello, Sparkling second page')
console.info('lynx.__globalProps', lynx.__globalProps)
if (lynx.__globalProps && lynx.__globalProps.queryItems) {
let { itemId1, isDarkMode1 } = lynx.__globalProps.queryItems;
console.info('gotten :', { itemId1, isDarkMode1 });
setIsDarkMode(isDarkMode1)
setItemId(itemId1)
}
props.onMounted?.()
}, [props])
}
even the ide has the error
Expected behavior
set the itemId1 to 1223223 that passed from page a
Actual behavior
itemId1 is null or ""
Logs / screenshots
Environment
- Host OS: windows 11
- Target platform (Android/iOS): android
- Node.js version: 25
Contribution
Preflight checklist
main(or have provided the exact version/commit below).Component
packages/sparkling-sdk
What happened?
i pass some params to another page in android environment,but the new page can not get the params values by lynx.__globalProps.queryItems
Steps to reproduce
page A's codes:
detail's codes:
even the ide has the error
Expected behavior
set the itemId1 to 1223223 that passed from page a
Actual behavior
itemId1 is null or ""
Logs / screenshots
Environment
Contribution