Understanding Data Handling in Svelte with Inertia.js: When to Use export let
vs $page.props
#1743
Unanswered
kevin82222
asked this question in
Help (Svelte)
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm using Inertia + Svelte in my side project, but I'm not quite clear on the differences between the two methods of receiving backend data.
In Svelte, we can use
export let propsName
to receive props passed from a parent component.However, in Inertia.js, there is another way to receive incoming data, using
$page
store.Could you explain when to use
export let ...
and when to use$page.props
? What are the differences between these two methods?Thanks
Beta Was this translation helpful? Give feedback.
All reactions