|
|
|
|
|
by modalist
3229 days ago
|
|
Hi nherment, I appreciate your feeedback. To follow up on some of your concerns: Top-level UI components can have state now: class {
onCreate () {
this.state = {
count: 0
}
}
increment () {
this.state.count++;
}
}
<html>
<body>
<div onClick('increment')>Count: ${state.count}</div>
</body>
</html>
If Marko's built-in component state management is not sufficient, you can of course use Redux with Marko. Here's a sample app: https://github.com/marko-js-samples/marko-redux.Marko does not have an "officially" supported router yet, but this is the one we've been pointing people to: https://github.com/charlieduong94/marko-path-router. If I understand your statement correctly, you mean that you would prefer to export the path directly from the component? I agree that this should be supported. Currently, Marko does not support exports, but it's actually on our issues board https://github.com/marko-js/marko/issues/538. We'd like to support the following: export var route = '/about';
class {
...
}
<div>About!</div>
This actually would be fairly easy to implement, but we've been focusing on other things. I think that we should reprioritize this issue though.It's definitely true that we have a lot of features that we'd love to focus on and a very small team of engineers working on Marko/Lasso. I welcome you and anyone else to jump in and help if you'd like! Any contributions are extremely appreciated. Additionally, feel free to drop into the Marko Gitter chat with any concerns and we'll try to help https://gitter.im/marko-js/marko. |
|
While it is true that this is now working, updating the state in the component that contains the <lasso-head/> and <lasso-body/> tags will cause the dependencies (defined in browser.json) to be lost. Unfortunately, the stylesheets are included in the dependencies... This means that playing with state at the top level removes any styling on the page.
This is EXACTLY the type of insanity that makes me recommend AGAINST using marko...
Example code here: https://github.com/nherment/marko-css-error