diff --git a/examples/chat/js/alt.js b/examples/chat/js/alt.js new file mode 100644 index 00000000..bd741e17 --- /dev/null +++ b/examples/chat/js/alt.js @@ -0,0 +1,2 @@ +var Alt = require('../../../') +module.exports = new Alt() diff --git a/examples/chat/js/constants/ChatConstants.js b/examples/chat/js/constants/ChatConstants.js deleted file mode 100644 index fedd59b5..00000000 --- a/examples/chat/js/constants/ChatConstants.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This file is provided by Facebook for testing and evaluation purposes - * only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -var keyMirror = require('react/lib/keyMirror'); - -module.exports = { - - ActionTypes: keyMirror({ - CLICK_THREAD: null, - CREATE_MESSAGE: null, - RECEIVE_RAW_CREATED_MESSAGE: null, - RECEIVE_RAW_MESSAGES: null - }), - - PayloadSources: keyMirror({ - SERVER_ACTION: null, - VIEW_ACTION: null - }) - -}; diff --git a/examples/chat/js/dispatcher/ChatAppDispatcher.js b/examples/chat/js/dispatcher/ChatAppDispatcher.js deleted file mode 100644 index 0beee317..00000000 --- a/examples/chat/js/dispatcher/ChatAppDispatcher.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This file is provided by Facebook for testing and evaluation purposes - * only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -var ChatConstants = require('../constants/ChatConstants'); -var Dispatcher = require('flux').Dispatcher; -var copyProperties = require('react/lib/copyProperties'); - -var PayloadSources = ChatConstants.PayloadSources; - -var ChatAppDispatcher = copyProperties(new Dispatcher(), { - - /** - * @param {object} action The details of the action, including the action's - * type and additional data coming from the server. - */ - handleServerAction: function(action) { - var payload = { - source: PayloadSources.SERVER_ACTION, - action: action - }; - this.dispatch(payload); - }, - - /** - * @param {object} action The details of the action, including the action's - * type and additional data coming from the view. - */ - handleViewAction: function(action) { - var payload = { - source: PayloadSources.VIEW_ACTION, - action: action - }; - this.dispatch(payload); - } - -}); - -module.exports = ChatAppDispatcher;