Comments (1)
It occurred to me that Bazooka doesn't need tools for communication between components (at least as separate component), and doesn't need Baz#r
/Baz#g
and/or BazComp.deps
Communication can be dealt with by application ("$.Event/localStorage/AJAX/Rx/new-fancy-technology"). Baz#r
/Baz#g
and deps
can be solved with standard require()
and module.exports
:
// metrics.js
function track_event(category, action, label) {
// ...
}
module.exports = {
f: function (node) {
node.onclick = track_event(...);
},
track_event: track_event,
}
// componentWithTracking.js
var Metrics = require('metrics');
module.exports = function (node) {
node.onkeyup = Metrics.track_event(...);
}
<!-- nodeOnlyWithTracking.html -->
<div data-bazooka='metrics'>Click me for tracking</div>
Also, the absence of Baz#r
/Baz#g
will solve #17
from bazooka.
Related Issues (15)
- Possible collision of bazids HOT 1
- Possible collision of method names
- Bazooka.h HOT 1
- removed node cleanup HOT 1
- remove polyfills from dependencies
- docs for Baz.h
- Lazy registring HOT 5
- Tests for Baz.watch()
- "Component not found" callback HOT 1
- Exceptions during component initialization should be caught
- Simplifying of hot reloadable components
- Async component init
- Component is not disposed when parent node is removed from a page HOT 5
- Watching DOM for new nodes with `data-bazooka` HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bazooka.