nandorojo / solito

🧍‍♂️ React Native + Next.js, unified.

Home Page:https://solito.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Link / push change URL+ execute getServerSideProps, but "setParams" (createParam) change URL but no getServerSideProps

tompap opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Do you want this issue prioritized?

  • Yes, I have sponsored
  • Not urgent

Current Behavior

When updating screen params using setParams of createParam I was excepting that next will executed getServerSideProps but this is not the case.
When using Link or useRouter (push) getServiceSideProps is executed

Example
A button : link href="/?page=2" => getServerSideProps is executed
A button: Pressable onPress => setParams({page:2}) => getServerSideProps is not executed

Expected Behavior

Behavior should be the same

Steps To Reproduce

No response

Versions

- Solito: 4.0.1
- Next.js: 13
- Expo: 50

Screenshots

No response

Reproduction

No response

Ok I found that { shallow: true} is hardcoded in the setparams, should it be configurable ?

Interesting…suppose this could be configured