This is a proposal for ReactiveConf 2017 open call for Lightning talks. If you'd like to make this talk happen, please 🌟 this gist and retweet my tweet. 🙏
✅ Don't just prototype but code as a designer
This is a proposal for ReactiveConf 2017 open call for Lightning talks. If you'd like to make this talk happen, please 🌟 this gist and retweet my tweet. 🙏
✅ Don't just prototype but code as a designer
This proposal is not longer active. Context: https://twitter.com/siddharthkp/status/909818777314902016
| import mobx from 'mobx' | |
| const DEFAULT_STYLE = 'color: #006d92; font-weight:bold;' | |
| // Just call this function after MobX initialization | |
| // As argument you can pass an object with: | |
| // - collapsed: true -> shows the log collapsed | |
| // - style -> the style applied to the action description | |
| export const startLogging = ({ collapsed, style } = {}) => { | |
| mobx.spy(event => { |
| app.config(function(RestangularProvider) { | |
| // First let's set listTypeIsArray to false, as we have the array wrapped in some other object. | |
| RestangularProvider.setListTypeIsArray(false); | |
| // Now let's configure the response extractor for each request | |
| RestangularProvider.setResponseExtractor(function(response, operation, what, url) { | |
| var newResponse; | |
| // This is a get for a list | |
| if (operation === "getList") { | |
| // First the newResponse will be response.objects which is actually an array |
| /** | |
| * jQuery alterClass plugin | |
| * | |
| * Remove element classes with wildcard matching. Optionally add classes: | |
| * $( '#foo' ).alterClass( 'foo-* bar-*', 'foobar' ) | |
| * | |
| * Copyright (c) 2011 Pete Boere (the-echoplex.net) | |
| * Free under terms of the MIT license: http://www.opensource.org/licenses/mit-license.php | |
| * | |
| */ |
| var pubsub = {}; | |
| (function(q) { | |
| var topics = {}, subUid = -1; | |
| q.subscribe = function(topic, func) { | |
| if (!topics[topic]) { | |
| topics[topic] = []; | |
| } | |
| var token = (++subUid).toString(); | |
| topics[topic].push({ | |
| token: token, |