JSFiddle - React, Tailwind, and code Playground
by Dmitry Morar
JavaScript
// newFileByOvidiu.js
import flight from 'flightjs';
export default flight.component(function() {
this.gaeeFunction = function() {
// your logic
}
this.after('initialize', function() {
// init trigger function
this.on('pushProductClicke', this.gaeeFunction);
})
})
// app.js
...
import Wishlist from '../ui/wishlist';
import ShopTheRoom from '../ui/shop_the_room';
import newFileByOvidiu from '../ui/newFileByOvidiu';
...
Wishlist.attachTo(this.select('wishlistSelector'));
ShopTheRoom.attachTo(this.select('shopTheRoomSelector'));
newFileByOvidiu.attachTo(document)
/*
then in link
$(document).trigger('pushProductClicke', [gaeeData]);
*/