-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to use with ESM import? #19
Comments
Thank you! Right now nope. But yeah, I've planned to add it within a few updates. Will need to check if it works properly with existing code (modules being async may cause unexpected behavior). |
Thanks, that is good to know. I played around with SB for a while today, but – having spent time with Vue before – encountered various dead ends. I wasn't sure whether I made mistakes, or maybe there's just limitations in SB I didn't know of. In my case it was hard to build around not being able to set HTML attributes/values, or have functions associated with specific strawberry objects. That made it kind of hard to group things by concern in Javascript. I looked at the roadmap and saw your idea regarding attribute handling. Maybe I'll look into this again in the future. Anyway, keep up the good work and thanks for the speedy reply! |
Thanks for trying it out!
Can you tell me what they were? (besides the ones you've listed) I'll have an idea of what's expected. If not directly adding it it into strawberry, I can add in the meta feature that makes it really convenient to do what's required.
There are several limitations and broken features cause I'm still building the core out. Once I can build a small interactive app with it the, |
It's hard to point to individual aspects, but for example I did not get why computed properties would not work as expected <div class="player">
<span sb-mark="player.dex">x</span>
<span sb-mark="player.str">y</span>
<span sb-mark="player.res.fire">z</span>
<span sb-mark="player.res.cold">z</span>
</div> data.player = {
'str': 20,
'dex': function () { return 30; },
'res': {
'fire': 25,
'cold': 15
}
}; The lack of attribute support made it complicated to, let's say, toggle dialog visibility, or active/inactive states of elements. And I could not wrap my mind around how I would use classes with Strawberry's reactivity. I often build small RPG interfaces to try things out, and classes map well to player characters and world objects, since they can have attributes, but also do things ("functions/methods"). If I Like if I make a event listener for a button, is it possible to have it call a function that is nested in the data.player = {
'str': 20,
'dex': 30,
'defend': function () { // do something }
}; Anyway, you don't have to answer or explain any of this, I don't mean to take up your time like this. But I guess you could take my feedback into account when at some point in the future you're writing up the docs about this stuff, or about the known limitations. Thanks for reading this! |
Is it possible to import this as a module, maybe like so:
Not important, but maybe something to implement at some point in the future, if it's not too much trouble.
Liking the project and its philosophy very much so far!
The text was updated successfully, but these errors were encountered: