Comments (10)
Maybe different wrappers (react, polymer, angular component) should be in separate repos? Likely is an independent vanillajs library.
from likely.
Maybe different wrappers (react, polymer, angular component) should be in separate repos?
@vitkarpov, do you have any ideas about how this could be implemented? Likely is tightly coupled with the real DOM, and I believe making it wrapper-agnostic is a complex task.
from likely.
Generally, I like the idea, but I’m afraid it could be a bit complex to implement.
from likely.
Likely is tightly coupled with the real DOM
if we speak about React I think it could be like this:
const likely = require('ilyabirman-likely');
React.createClass('Likely', {
componentDidMount() {
this.update();
},
/**
* Public method to update the component
*/
update() {
likely(this.node);
},
/**
* Likely knows how to change itself,
* React can't do anything useful
*/
shouldComponentUpdate: () => false,
render() {
return <div ref={(node) => this.node = node;}>
<div class="facebook">Share</div>
<div class="twitter">Tweet</div>
<div class="gplus">+1</div>
<div class="vkontakte">Share</div>
<div class="pinterest">Pin</div>
<div class="odnoklassniki">Like</div>
<div class="telegram">Send</div>
</div>;
}
})
But there's a problem: likely autoinitializes itself on document loaded and with React it doesn't work as expected.
from likely.
Anyway I think in such case we need Likely organization with different repos:
- likely-core (Button constructor is here)
- likely-vanilla (autoinitialization on document load here)
- likely-react (React component here)
- ...
from likely.
(I’m frightened)
from likely.
I’ll write about this a bit later. (I tend to close this currently.)
from likely.
I tend to close this currently
+1 — seems very complicated right now.
from likely.
if we speak about React I think it could be like this:
Wow, an interesting approach. I’ve never worked on itegrating React with 3rd-party libraries before, and it seems this is a standard solution for integration. Both weird and beautiful at the same time.
from likely.
I tend to close this currently.
Well, this task is really complex and expensive. As there’re no more requests for this functionaly, I’m closing this now. I’d be glad to reopen this if we see more requests for React support though.
from likely.
Related Issues (20)
- Vertical margins slightly differ HOT 6
- Improve interpretation of attributes HOT 3
- Version 2.5 epic HOT 7
- Fix Travis CI build
- Proofread and clean up the readme HOT 3
- Uncaught TypeError: o.promises[t] is not a function HOT 12
- Plans for 2.6 HOT 3
- Update colors and icons
- twitter data-title issue HOT 3
- Version 3.1 epic HOT 3
- 2.5.0 bug "Uncaught TypeError: Cannot read property 'trigger' of undefined" HOT 5
- кнопка постила с postila.ru HOT 2
- Text duplication on twitter share HOT 2
- Facebook: (#2) Service temporarily unavailable HOT 1
- Problem with whatsapp HOT 3
- data-url param adds dup url HOT 2
- share button works only one time in share modal HOT 2
- Homepage: Update Likely to 3.0 HOT 2
- Use flexbox with gap instead of margins HOT 3
- Will a new twitter logo be added? HOT 2
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 likely.