Combine Alpine.data with extra data #1585
-
Hi, I used to add an optional argument in my component to override it's data, like: <div x-data="MyComponent({ title: 'New title' })"> window.MyComponent = function ({ settings = {}) {
return {
title: 'Default title',
...settings
}
} But it doesn't seem to work with |
Beta Was this translation helpful? Give feedback.
Answered by
ryangjchandler
Jun 21, 2021
Replies: 1 comment 1 reply
-
This currently isn't possible. Ive got a PR open to support it, but I'm going to open another one with an alternative approach too. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Djules
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This currently isn't possible. Ive got a PR open to support it, but I'm going to open another one with an alternative approach too.