nandorojo / solito

🧍‍♂️ React Native + Next.js, unified.
https://solito.dev
MIT License
3.54k stars 180 forks source link

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

Open tompap opened 6 months ago

tompap commented 6 months ago

Is there an existing issue for this?

Do you want this issue prioritized?

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

tompap commented 6 months ago

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

nandorojo commented 6 months ago

Interesting…suppose this could be configured