What are Svelte props?

Answer

In Svelte, props are variables exported from the component's <script> block. The export let syntax declares a prop: <script> export let name; export let count = 0; </script>. The default value (count = 0) is used when the parent doesn't provide a value. Parent usage: <Child name="Alice" count={5} />. Props are reactive — when the parent updates the value, the child re-renders. Spread props: <Child {...user} /> passes all properties of an object as props. Svelte's prop system is simpler than React's: there is no destructuring pattern, no defaultProps, and no prop-types — just exported variables with optional defaults. For one-way data flow, use props; for two-way binding, use the bind: directive.