├── packages
├── fluxible-router
│ ├── .eslintignore
│ ├── .npmignore
│ ├── src
│ │ ├── NavLink.js
│ │ └── index.js
│ ├── .babelrc.json
│ ├── docs
│ │ ├── README.md
│ │ ├── api
│ │ │ ├── README.md
│ │ │ ├── createNavLinkComponent.md
│ │ │ └── handleRoute.md
│ │ └── guides
│ │ │ ├── scrolling.md
│ │ │ └── history.md
│ ├── tests
│ │ ├── mocks
│ │ │ └── MockAppComponent.js
│ │ └── unit
│ │ │ └── handleRoute.test.js
│ └── CONTRIBUTING.md
├── dispatchr
│ ├── .npmignore
│ ├── utils
│ │ ├── index.js
│ │ ├── BaseStore.js
│ │ └── createStore.js
│ ├── addons
│ │ └── index.js
│ ├── index.js
│ ├── CHANGELOG.md
│ ├── package.json
│ ├── tests
│ │ ├── unit
│ │ │ └── addons
│ │ │ │ └── BaseStore.test.js
│ │ └── mock
│ │ │ ├── NoDehydrate.js
│ │ │ └── DelayedStore.js
│ └── CONTRIBUTING.md
├── generator-fluxible
│ ├── .yo-rc.json
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── app
│ │ ├── templates
│ │ │ ├── stores
│ │ │ │ ├── RouteStore.js
│ │ │ │ └── ApplicationStore.js
│ │ │ ├── components
│ │ │ │ ├── Home.js
│ │ │ │ ├── About.js
│ │ │ │ ├── Html.js
│ │ │ │ ├── Nav.js
│ │ │ │ └── Application.js
│ │ │ ├── babel.config.js
│ │ │ ├── app.js
│ │ │ ├── configs
│ │ │ │ └── routes.js
│ │ │ ├── client.js
│ │ │ ├── webpack.config.js
│ │ │ └── package.json
│ │ └── index.js
│ ├── README.md
│ ├── package.json
│ └── tests
│ │ └── unit
│ │ └── test-app.test.js
├── fluxible-plugin-fetchr
│ ├── .npmignore
│ ├── index.js
│ ├── tests
│ │ └── fixtures
│ │ │ └── services
│ │ │ └── mockService.js
│ ├── package.json
│ ├── CONTRIBUTING.md
│ └── utils
│ │ └── MockServiceManager.js
├── fluxible-reducer-store
│ ├── UPGRADE.md
│ ├── CHANGELOG.md
│ ├── index.js
│ ├── .npmignore
│ ├── tests
│ │ └── fixtures
│ │ │ └── stores
│ │ │ └── SingleReducerStore.js
│ └── package.json
├── fluxible
│ ├── .npmignore
│ ├── utils
│ │ ├── index.js
│ │ ├── generateUUID.js
│ │ ├── createMockActionContext.js
│ │ ├── createMockComponentContext.js
│ │ ├── deprecateComponent.js
│ │ ├── MockComponentContext.js
│ │ ├── MockActionContext.js
│ │ └── promiseCallback.js
│ ├── addons
│ │ ├── BaseStore.js
│ │ ├── createStore.js
│ │ └── index.js
│ ├── index.js
│ ├── tests
│ │ └── fixtures
│ │ │ ├── stores
│ │ │ ├── BarStore.js
│ │ │ └── FooStore.js
│ │ │ └── plugins
│ │ │ ├── DimensionsContextPluginSync.js
│ │ │ ├── DimensionsContextPlugin.js
│ │ │ └── DimensionsContextPluginPromise.js
│ ├── docs
│ │ └── api
│ │ │ └── addons
│ │ │ ├── createStore.md
│ │ │ └── BaseStore.md
│ └── package.json
├── fluxible-plugin-devtools
│ ├── src
│ │ ├── lib
│ │ │ └── CONSTANTS.js
│ │ └── components
│ │ │ └── Actions.jsx
│ ├── .npmignore
│ ├── index.js
│ ├── docs
│ │ └── fluxible-plugin-devtools.md
│ ├── CHANGELOG.md
│ ├── package.json
│ └── README.md
└── fluxible-addons-react
│ ├── .npmignore
│ ├── docs
│ └── api
│ │ ├── useFluxible.md
│ │ ├── withFluxible.md
│ │ ├── batchedUpdatePlugin.md
│ │ ├── createElementWithContext.md
│ │ ├── provideContext.md
│ │ └── FluxibleComponent.md
│ ├── tests
│ ├── fixtures
│ │ └── stores
│ │ │ ├── BarStore.js
│ │ │ └── FooStore.js
│ └── unit
│ │ └── lib
│ │ ├── useFluxible.test.js
│ │ └── withFluxible.test.js
│ ├── .babelrc.json
│ ├── src
│ ├── FluxibleComponentContext.js
│ ├── FluxibleProvider.js
│ ├── useFluxible.js
│ ├── FluxibleComponent.js
│ ├── index.js
│ ├── batchedUpdatePlugin.js
│ ├── withFluxible.js
│ ├── createElementWithContext.js
│ └── provideContext.js
│ ├── package.json
│ └── CONTRIBUTING.md
├── .npmrc
├── .prettierrc.json
├── examples
├── doc-site
│ ├── .eslintignore
│ ├── assets
│ │ ├── images
│ │ │ ├── favicon.ico
│ │ │ └── splash_background.jpg
│ │ └── css
│ │ │ └── ie.css
│ ├── .gitignore
│ ├── .mocharc.js
│ ├── .babelrc
│ ├── .nycrc
│ ├── actions
│ │ ├── demoException.js
│ │ ├── doSearch.js
│ │ ├── showHome.js
│ │ ├── showSearch.js
│ │ ├── loadIndex.js
│ │ └── showDoc.js
│ ├── configs
│ │ ├── redirects.js
│ │ └── atomic.js
│ ├── tests
│ │ ├── fixtures
│ │ │ └── doc-response.js
│ │ └── unit
│ │ │ └── actions
│ │ │ ├── demoException.js
│ │ │ ├── doSearch.js
│ │ │ ├── showSearch.js
│ │ │ └── loadIndex.js
│ ├── utils
│ │ ├── getSearchIndexPath.js
│ │ ├── assets.js
│ │ └── renderer.js
│ ├── start.js
│ ├── secrets.js
│ ├── services
│ │ └── search.js
│ ├── .eslintrc.js
│ ├── client.js
│ ├── components
│ │ ├── Status500.js
│ │ └── Status404.js
│ ├── plugins
│ │ └── queryPlugin.js
│ └── app.js
├── chat
│ ├── .babelrc
│ ├── stores
│ │ ├── RouteStore.js
│ │ └── UnreadThreadStore.js
│ ├── start.js
│ ├── webpack.config.js
│ ├── app.js
│ ├── README.md
│ ├── actions
│ │ ├── openThread.js
│ │ ├── showChat.js
│ │ └── createMessage.js
│ ├── configs
│ │ └── routes.js
│ ├── components
│ │ ├── ChatApp.js
│ │ ├── MessageListItem.js
│ │ ├── Html.js
│ │ └── ThreadListItem.js
│ └── package.json
├── todo
│ ├── .babelrc
│ ├── assets
│ │ ├── todomvc-common
│ │ │ └── bg.png
│ │ └── styles.css
│ ├── start.js
│ ├── README.md
│ ├── app.js
│ ├── actions
│ │ ├── deleteTodo.js
│ │ ├── updateTodo.js
│ │ ├── showTodos.js
│ │ ├── toggleAll.js
│ │ └── createTodo.js
│ ├── webpack.config.js
│ ├── client.js
│ ├── stores
│ │ └── PageStore.js
│ └── package.json
├── react-router
│ ├── .babelrc
│ ├── actions
│ │ ├── navigate.js
│ │ └── updateTime.js
│ ├── start.js
│ ├── components
│ │ ├── Home.js
│ │ ├── About.js
│ │ ├── Routes.js
│ │ ├── Application.js
│ │ ├── Timestamp.js
│ │ ├── Page.js
│ │ ├── Nav.js
│ │ └── Html.js
│ ├── README.md
│ ├── app.js
│ ├── webpack.config.js
│ ├── stores
│ │ ├── PageStore.js
│ │ ├── TimeStore.js
│ │ └── ApplicationStore.js
│ ├── package.json
│ └── client.js
├── fluxible-router
│ ├── .babelrc
│ ├── stores
│ │ ├── RouteStore.js
│ │ ├── PageStore.js
│ │ ├── TimeStore.js
│ │ └── ApplicationStore.js
│ ├── start.js
│ ├── actions
│ │ └── updateTime.js
│ ├── components
│ │ ├── Home.js
│ │ ├── About.js
│ │ ├── Page.js
│ │ ├── Timestamp.js
│ │ ├── Application.js
│ │ └── Html.js
│ ├── browser-only
│ │ ├── index.html
│ │ ├── webpack.config.js
│ │ └── browser-only.js
│ ├── app.js
│ ├── webpack.config.js
│ ├── README.md
│ ├── client.js
│ └── package.json
├── minimal
│ ├── src
│ │ ├── actions.js
│ │ ├── fluxibleApp.js
│ │ ├── App.js
│ │ ├── AppStore.js
│ │ ├── browser.js
│ │ ├── RandomNumberGenerator.js
│ │ └── server.js
│ ├── babel.config.js
│ ├── README.md
│ ├── package.json
│ └── webpack.config.js
├── create-react-app
│ ├── src
│ │ ├── actions.js
│ │ ├── fluxibleApp.js
│ │ ├── App.js
│ │ ├── index.js
│ │ ├── AppStore.js
│ │ └── RandomNumberGenerator.js
│ ├── .gitignore
│ ├── package.json
│ └── public
│ │ └── index.html
└── stale-props
│ ├── src
│ ├── fluxibleApp.js
│ ├── App.js
│ ├── actions.js
│ ├── List.js
│ ├── index.js
│ ├── Input.js
│ ├── ListStore.js
│ └── Item.js
│ ├── public
│ └── index.html
│ ├── package.json
│ └── README.md
├── .prettierignore
├── .eslintignore
├── babel.config.json
├── jest.config.js
├── .gitignore
├── .github
├── dependabot.yml
├── ISSUE_TEMPLATE
│ ├── feature_request.md
│ └── bug_report.md
└── workflows
│ └── node.js.yml
├── .changeset
├── config.json
└── README.md
├── CONTRIBUTING.md
├── .eslintrc.js
└── docs
├── quick-start.md
├── README.md
├── home.md
└── community
└── articles.md
/packages/fluxible-router/.eslintignore:
--------------------------------------------------------------------------------
1 | /dist
2 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | legacy-peer-deps = true
2 | package-lock = false
3 |
--------------------------------------------------------------------------------
/packages/dispatchr/.npmignore:
--------------------------------------------------------------------------------
1 | /artifacts/
2 | /docs/
3 | /tests/
4 |
--------------------------------------------------------------------------------
/packages/generator-fluxible/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-generator": {}
3 | }
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "tabWidth": 4
4 | }
5 |
--------------------------------------------------------------------------------
/examples/doc-site/.eslintignore:
--------------------------------------------------------------------------------
1 | artifacts
2 | build
3 | node_modules
4 | dist
5 |
--------------------------------------------------------------------------------
/examples/chat/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["@babel/preset-env", "@babel/preset-react"]
3 | }
4 |
--------------------------------------------------------------------------------
/examples/todo/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["@babel/preset-env", "@babel/preset-react"]
3 | }
4 |
--------------------------------------------------------------------------------
/packages/fluxible-plugin-fetchr/.npmignore:
--------------------------------------------------------------------------------
1 | /artifacts/
2 | /docs/
3 | /tests/
4 | .npmignore
5 |
--------------------------------------------------------------------------------
/packages/fluxible-reducer-store/UPGRADE.md:
--------------------------------------------------------------------------------
1 | # Upgrade Guide
2 |
3 | No breaking changes yet.
4 |
--------------------------------------------------------------------------------
/packages/fluxible-reducer-store/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 |
3 | ## 0.1.0
4 |
5 | First version.
6 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | *.html
2 | *.json
3 | *.md
4 | *.yml
5 | .nyc_output
6 | build
7 | coverage
8 | dist
9 |
--------------------------------------------------------------------------------
/examples/react-router/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["@babel/preset-env", "@babel/preset-react"]
3 | }
4 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | artifacts
2 | build
3 | dist
4 | node_modules
5 | **/artifacts
6 | **/build
7 | **/node_modules
8 |
--------------------------------------------------------------------------------
/examples/fluxible-router/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["@babel/preset-env", "@babel/preset-react"]
3 | }
4 |
--------------------------------------------------------------------------------
/packages/fluxible-router/.npmignore:
--------------------------------------------------------------------------------
1 | .*
2 | /artifacts/
3 | /docs/
4 | /src/
5 | /tests/
6 | *.log
7 | *.md
8 | *.tgz
9 |
--------------------------------------------------------------------------------
/packages/fluxible/.npmignore:
--------------------------------------------------------------------------------
1 | artifacts
2 | docs
3 | tests
4 | .idea
5 | *.log
6 | .coveralls
7 | .npmignore
8 | .travis.yml
9 |
--------------------------------------------------------------------------------
/babel.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["@babel/preset-env", "@babel/preset-react"],
3 | "babelrcRoots": ["packages/*"]
4 | }
5 |
--------------------------------------------------------------------------------
/packages/fluxible-plugin-devtools/src/lib/CONSTANTS.js:
--------------------------------------------------------------------------------
1 | export const ACTION = 'action';
2 | export const DISPATCH = 'dispatch';
3 |
--------------------------------------------------------------------------------
/examples/doc-site/assets/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yahoo/fluxible/HEAD/examples/doc-site/assets/images/favicon.ico
--------------------------------------------------------------------------------
/examples/todo/assets/todomvc-common/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yahoo/fluxible/HEAD/examples/todo/assets/todomvc-common/bg.png
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | transform: {
3 | '\\.js$': ['babel-jest', { cwd: __dirname }],
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/packages/fluxible-reducer-store/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | createReducerStore: require('./lib/createReducerStore'),
3 | };
4 |
--------------------------------------------------------------------------------
/packages/generator-fluxible/.npmignore:
--------------------------------------------------------------------------------
1 | artifacts
2 | docs
3 | tests
4 | .idea
5 | *.log
6 | .coveralls
7 | .npmignore
8 | .travis.yml
9 |
--------------------------------------------------------------------------------
/packages/dispatchr/utils/index.js:
--------------------------------------------------------------------------------
1 | throw new Error(
2 | "require('dispatchr/utils') has moved to require('dispatchr/addons')",
3 | );
4 |
--------------------------------------------------------------------------------
/packages/fluxible-reducer-store/.npmignore:
--------------------------------------------------------------------------------
1 | artifacts
2 | docs
3 | tests
4 | .idea
5 | *.log
6 | .coveralls
7 | .npmignore
8 | .travis.yml
9 |
--------------------------------------------------------------------------------
/examples/doc-site/assets/images/splash_background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yahoo/fluxible/HEAD/examples/doc-site/assets/images/splash_background.jpg
--------------------------------------------------------------------------------
/packages/dispatchr/addons/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | BaseStore: require('./BaseStore'),
3 | createStore: require('./createStore'),
4 | };
5 |
--------------------------------------------------------------------------------
/examples/doc-site/.gitignore:
--------------------------------------------------------------------------------
1 | /.sass-cache
2 | /build/
3 | /screwdriver/
4 | /assets.js
5 | /deploy.json
6 | /grasshopper.json
7 | /replicatr.js
8 | /secrets/
9 |
--------------------------------------------------------------------------------
/packages/fluxible-plugin-devtools/.npmignore:
--------------------------------------------------------------------------------
1 | artifacts
2 | docs
3 | src
4 | tests
5 | .idea
6 | *.log
7 | .coveralls
8 | .npmignore
9 | .travis.yml
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .nyc_output
2 | coverage
3 | dist
4 | artifacts
5 | node_modules
6 | *.log
7 | *.tgz
8 | .jshintrc
9 | *.sh
10 | examples/*/build
11 | temp/
12 |
--------------------------------------------------------------------------------
/packages/dispatchr/utils/BaseStore.js:
--------------------------------------------------------------------------------
1 | throw new Error(
2 | "require('dispatchr/utils/BaseStore') has moved to require('dispatchr/addons/BaseStore')",
3 | );
4 |
--------------------------------------------------------------------------------
/examples/doc-site/.mocharc.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | module.exports = {
4 | recursive: true,
5 | reporter: 'spec',
6 | timeout: 10000,
7 | };
8 |
--------------------------------------------------------------------------------
/examples/todo/assets/styles.css:
--------------------------------------------------------------------------------
1 | #todo-list li.pending {
2 | background-color: #ffedd0;
3 | }
4 | #todo-list li.failure {
5 | background-color: #ffc9c4;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/dispatchr/utils/createStore.js:
--------------------------------------------------------------------------------
1 | throw new Error(
2 | "require('dispatchr/utils/createStore') has moved to require('dispatchr/addons/createStore')",
3 | );
4 |
--------------------------------------------------------------------------------
/packages/generator-fluxible/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # generator-fluxible
2 |
3 | ## 2.0.0
4 |
5 | ### Major Changes
6 |
7 | - 10fea13: feat: upgrade to latest yeoman packages
8 |
--------------------------------------------------------------------------------
/examples/react-router/actions/navigate.js:
--------------------------------------------------------------------------------
1 | module.exports = function (actionContext, payload, done) {
2 | actionContext.dispatch('CHANGE_ROUTE', payload);
3 | done();
4 | };
5 |
--------------------------------------------------------------------------------
/packages/fluxible-addons-react/.npmignore:
--------------------------------------------------------------------------------
1 | artifacts
2 | docs
3 | src
4 | tests
5 | .idea
6 | *.log
7 | *.md
8 | .babelrc.json
9 | .coveralls
10 | .npmignore
11 | .travis.yml
12 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: npm
4 | directory: "/"
5 | schedule:
6 | interval: weekly
7 | time: "13:00"
8 | open-pull-requests-limit: 10
9 |
--------------------------------------------------------------------------------
/examples/fluxible-router/stores/RouteStore.js:
--------------------------------------------------------------------------------
1 | import { RouteStore } from 'fluxible-router';
2 | import routes from '../configs/routes';
3 |
4 | export default RouteStore.withStaticRoutes(routes);
5 |
--------------------------------------------------------------------------------
/examples/chat/stores/RouteStore.js:
--------------------------------------------------------------------------------
1 | var RouteStore = require('fluxible-router').RouteStore;
2 | var routes = require('../configs/routes');
3 |
4 | module.exports = RouteStore.withStaticRoutes(routes);
5 |
--------------------------------------------------------------------------------
/examples/doc-site/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["@babel/preset-env", "@babel/preset-react"],
3 | "env": {
4 | "test": {
5 | "plugins": ["istanbul"]
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/minimal/src/actions.js:
--------------------------------------------------------------------------------
1 | export const setRandomNumber = (context) => {
2 | const number = Math.floor(Math.random() * Math.floor(100));
3 | context.dispatch('SET_NUMBER', { number });
4 | };
5 |
--------------------------------------------------------------------------------
/examples/doc-site/.nycrc:
--------------------------------------------------------------------------------
1 | {
2 | "reporter": "lcov",
3 | "sourceMap": false,
4 | "instrument": false,
5 | "extends": "@istanbuljs/nyc-config-babel",
6 | "exclude": ["components/**/*"]
7 | }
8 |
--------------------------------------------------------------------------------
/packages/fluxible/utils/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | createMockActionContext: require('./createMockActionContext'),
3 | createMockComponentContext: require('./createMockComponentContext'),
4 | };
5 |
--------------------------------------------------------------------------------
/examples/create-react-app/src/actions.js:
--------------------------------------------------------------------------------
1 | export const setRandomNumber = (context) => {
2 | const number = Math.floor(Math.random() * Math.floor(100));
3 | context.dispatch('SET_NUMBER', { number });
4 | };
5 |
--------------------------------------------------------------------------------
/packages/generator-fluxible/app/templates/stores/RouteStore.js:
--------------------------------------------------------------------------------
1 | import { RouteStore } from 'fluxible-router';
2 | import routes from '../configs/routes';
3 |
4 | export default RouteStore.withStaticRoutes(routes);
5 |
--------------------------------------------------------------------------------
/packages/dispatchr/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | module.exports = require('./lib/Dispatcher');
6 |
--------------------------------------------------------------------------------
/packages/fluxible-plugin-fetchr/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | module.exports = require('./lib/fetchr-plugin');
6 |
--------------------------------------------------------------------------------
/examples/stale-props/src/fluxibleApp.js:
--------------------------------------------------------------------------------
1 | import Fluxible from 'fluxible';
2 | import ListStore from './ListStore';
3 |
4 | const fluxibleApp = new Fluxible({});
5 |
6 | fluxibleApp.registerStore(ListStore);
7 |
8 | export default fluxibleApp;
9 |
--------------------------------------------------------------------------------
/examples/stale-props/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Stale props example
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/chat/start.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | 'use strict';
6 | require('@babel/register');
7 |
8 | module.exports = require('./server');
9 |
--------------------------------------------------------------------------------
/examples/todo/start.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | 'use strict';
6 | require('@babel/register');
7 |
8 | module.exports = require('./server');
9 |
--------------------------------------------------------------------------------
/packages/fluxible/addons/BaseStore.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2015, Yahoo Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | 'use strict';
6 |
7 | module.exports = require('dispatchr/addons/BaseStore');
8 |
--------------------------------------------------------------------------------
/packages/fluxible/addons/createStore.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2015, Yahoo Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | 'use strict';
6 |
7 | module.exports = require('dispatchr/addons/createStore');
8 |
--------------------------------------------------------------------------------
/examples/react-router/start.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | 'use strict';
6 | require('@babel/register');
7 |
8 | module.exports = require('./server');
9 |
--------------------------------------------------------------------------------
/examples/fluxible-router/start.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | 'use strict';
6 | require('@babel/register');
7 |
8 | module.exports = require('./server');
9 |
--------------------------------------------------------------------------------
/examples/stale-props/src/App.js:
--------------------------------------------------------------------------------
1 | import List from './List';
2 | import Input from './Input';
3 |
4 | function App() {
5 | return (
6 |
7 |
8 |
9 |
10 | );
11 | }
12 |
13 | export default App;
14 |
--------------------------------------------------------------------------------
/packages/generator-fluxible/app/templates/components/Home.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default function Home() {
4 | return (
5 |
6 |
Home
7 |
Welcome to the site!
8 |
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/examples/minimal/src/fluxibleApp.js:
--------------------------------------------------------------------------------
1 | import Fluxible from 'fluxible';
2 | import App from './App';
3 | import AppStore from './AppStore';
4 |
5 | const fluxibleApp = new Fluxible({ component: App });
6 |
7 | fluxibleApp.registerStore(AppStore);
8 |
9 | export default fluxibleApp;
10 |
--------------------------------------------------------------------------------
/examples/create-react-app/src/fluxibleApp.js:
--------------------------------------------------------------------------------
1 | import Fluxible from 'fluxible';
2 | import App from './App';
3 | import AppStore from './AppStore';
4 |
5 | const fluxibleApp = new Fluxible({ component: App });
6 |
7 | fluxibleApp.registerStore(AppStore);
8 |
9 | export default fluxibleApp;
10 |
--------------------------------------------------------------------------------
/examples/doc-site/actions/demoException.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2015, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 |
6 | export default function demoException(context, route, done) {
7 | done(new Error('Whoops!'));
8 | }
9 |
--------------------------------------------------------------------------------
/packages/generator-fluxible/app/templates/components/About.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default function About() {
4 | return (
5 |
6 |
About
7 |
This is a description of the site.
8 |
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/packages/fluxible/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | var Fluxible = require('./lib/Fluxible');
6 | Fluxible.Fluxible = require('./lib/Fluxible');
7 |
8 | module.exports = Fluxible;
9 |
--------------------------------------------------------------------------------
/examples/fluxible-router/actions/updateTime.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | export default function (context, payload, done) {
6 | context.dispatch('UPDATE_TIME');
7 | done();
8 | }
9 |
--------------------------------------------------------------------------------
/examples/doc-site/configs/redirects.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | '/guides/bringing-flux-to-the-server.html':
3 | '/blog/2014-11-06-bringing-flux-to-the-server.html',
4 | '/tutorials/routing.html': '/extensions/routing.html',
5 | '/guides/data-services.html': '/extensions/data-services.html',
6 | };
7 |
--------------------------------------------------------------------------------
/examples/fluxible-router/components/Home.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | import React from 'react';
6 |
7 | const Home = () => Welcome to the site!
;
8 |
9 | export default Home;
10 |
--------------------------------------------------------------------------------
/examples/fluxible-router/components/About.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | import React from 'react';
6 |
7 | const About = () => This is a description of the site.
;
8 |
9 | export default About;
10 |
--------------------------------------------------------------------------------
/packages/fluxible/addons/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2015, Yahoo Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | 'use strict';
6 |
7 | module.exports = {
8 | BaseStore: require('./BaseStore'),
9 | createStore: require('./createStore'),
10 | };
11 |
--------------------------------------------------------------------------------
/examples/react-router/actions/updateTime.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | 'use strict';
6 |
7 | module.exports = function (context, payload, done) {
8 | context.dispatch('UPDATE_TIME');
9 | done();
10 | };
11 |
--------------------------------------------------------------------------------
/.changeset/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://unpkg.com/@changesets/config@2.1.1/schema.json",
3 | "changelog": "@changesets/cli/changelog",
4 | "commit": false,
5 | "fixed": [],
6 | "linked": [],
7 | "access": "public",
8 | "baseBranch": "master",
9 | "updateInternalDependencies": "patch",
10 | "ignore": []
11 | }
12 |
--------------------------------------------------------------------------------
/packages/fluxible-router/src/NavLink.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2015, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | import createNavLinkComponent from './createNavLinkComponent';
6 |
7 | const NavLink = createNavLinkComponent();
8 |
9 | export default NavLink;
10 |
--------------------------------------------------------------------------------
/examples/doc-site/tests/fixtures/doc-response.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2015, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 |
6 | export default {
7 | content: 'Quick Start
',
8 | key: '/docs/quick-start.md',
9 | title: 'Quick Start',
10 | };
11 |
--------------------------------------------------------------------------------
/examples/doc-site/utils/getSearchIndexPath.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | export default function getSearchIndexPath() {
4 | let path = process.cwd() + '/build/search.json';
5 | if (process.env.manhattan_context__cache_dir) {
6 | path =
7 | process.env.manhattan_context__cache_dir + '/fluxible.search.json';
8 | }
9 | return path;
10 | }
11 |
--------------------------------------------------------------------------------
/examples/doc-site/start.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2015, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 |
6 | // this file is mainly used to register babel
7 | // since the file that registers babel cannot be es6-ified
8 |
9 | require('@babel/register');
10 |
11 | module.exports = require('./server');
12 |
--------------------------------------------------------------------------------
/examples/minimal/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { provideContext } from 'fluxible-addons-react';
3 | import RandomNumberGenerator from './RandomNumberGenerator';
4 |
5 | const App = () => (
6 |
7 |
Fluxible Minimal Example
8 |
9 |
10 | );
11 |
12 | export default provideContext(App);
13 |
--------------------------------------------------------------------------------
/examples/react-router/components/Home.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | import React from 'react';
6 |
7 | class Home extends React.Component {
8 | render() {
9 | return Welcome to the site!
;
10 | }
11 | }
12 |
13 | export default Home;
14 |
--------------------------------------------------------------------------------
/packages/fluxible-router/.babelrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": [["@babel/plugin-transform-runtime", { "version": "7.14.0" }]],
3 | "env": {
4 | "commonjs": {
5 | "presets": [["@babel/preset-env", { "modules": "commonjs" }]]
6 | },
7 | "es": {
8 | "presets": [["@babel/preset-env", { "modules": false }]]
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/examples/create-react-app/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { provideContext } from 'fluxible-addons-react';
3 | import RandomNumberGenerator from './RandomNumberGenerator';
4 |
5 | const App = () => (
6 |
7 |
Fluxible Minimal Example
8 |
9 |
10 | );
11 |
12 | export default provideContext(App);
13 |
--------------------------------------------------------------------------------
/examples/doc-site/secrets.js:
--------------------------------------------------------------------------------
1 | /**
2 | * This is a sample file for using your Github access token to collect
3 | * the doc's from the fluxible repo.
4 | *
5 | * GitHub Auth docs: https://docs.github.com/en/rest/overview/resources-in-the-rest-api#authentication
6 | */
7 | export default {
8 | github: {
9 | accessToken: process.env.GITHUB_ACCESS_TOKEN || '',
10 | },
11 | };
12 |
--------------------------------------------------------------------------------
/examples/stale-props/src/actions.js:
--------------------------------------------------------------------------------
1 | import generateUUID from 'fluxible/utils/generateUUID';
2 |
3 | export function addItem({ dispatch }, { label }) {
4 | dispatch('addItem', {
5 | id: generateUUID(),
6 | label,
7 | });
8 | }
9 |
10 | export function removeItem({ dispatch }, { itemId }) {
11 | dispatch('removeItem', {
12 | itemId,
13 | });
14 | }
15 |
--------------------------------------------------------------------------------
/examples/react-router/components/About.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | import React from 'react';
6 |
7 | class About extends React.Component {
8 | render() {
9 | return This is a description of the site.
;
10 | }
11 | }
12 |
13 | export default About;
14 |
--------------------------------------------------------------------------------
/examples/create-react-app/src/index.js:
--------------------------------------------------------------------------------
1 | import ReactDOM from 'react-dom';
2 | import { createElementWithContext } from 'fluxible-addons-react';
3 | import fluxibleApp from './fluxibleApp';
4 |
5 | const context = fluxibleApp.createContext();
6 | const element = createElementWithContext(context);
7 | const rootElement = document.getElementById('root');
8 |
9 | ReactDOM.render(element, rootElement);
10 |
--------------------------------------------------------------------------------
/packages/fluxible-plugin-devtools/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 | module.exports = require('./dist/lib/devtools-plugin').default;
6 | module.exports.Actions = require('./dist/components/Actions').default;
7 | module.exports.ActionTree = require('./dist/components/ActionTree').default;
8 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contributing Code to `fluxible`
2 | -------------------------------
3 |
4 | Please be sure to read our [CLA][] before you submit pull requests or otherwise contribute to `fluxible`. This protects developers, who rely on [BSD license][].
5 |
6 | [BSD license]: https://github.com/yahoo/fluxible/blob/master/LICENSE.md
7 | [CLA]: https://github.com/yahoo/.github/blob/master/PULL_REQUEST_TEMPLATE.md
8 |
--------------------------------------------------------------------------------
/examples/doc-site/actions/doSearch.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2015, Yahoo! Inc.
3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 | */
5 |
6 | import debugLib from 'debug';
7 | const debug = debugLib('doSearch');
8 |
9 | export default function doSearch(context, query, done) {
10 | debug(query);
11 | context.dispatch('DO_SEARCH', query);
12 | done();
13 | }
14 |
--------------------------------------------------------------------------------
/examples/todo/README.md:
--------------------------------------------------------------------------------
1 | # todo
2 |
3 | This shows the full Flux flow from server to client as well as XHR
4 | posts for creating new todos so that they are persisted between page
5 | loads.
6 |
7 | ## Usage
8 |
9 |
10 | ```bash
11 | npm install
12 | npm run dev
13 | ```
14 |
15 | This will use `nodemon` and `webpack` to watch for changes and restart
16 | and rebuild as needed.
17 |
18 | Open http://localhost:3000
19 |
--------------------------------------------------------------------------------
/examples/minimal/babel.config.js:
--------------------------------------------------------------------------------
1 | const isNodeTarget = (api) =>
2 | api.caller((caller) => caller && caller.target === 'node');
3 |
4 | module.exports = (api) => ({
5 | presets: [
6 | [
7 | '@babel/preset-env',
8 | {
9 | targets: isNodeTarget(api) ? { node: 'current' } : 'defaults',
10 | },
11 | ],
12 | '@babel/preset-react',
13 | ],
14 | });
15 |
--------------------------------------------------------------------------------
/examples/minimal/src/AppStore.js:
--------------------------------------------------------------------------------
1 | import { createReducerStore } from 'fluxible-reducer-store';
2 |
3 | const AppStore = createReducerStore({
4 | storeName: 'AppStore',
5 | initialState: { number: 0 },
6 | reducers: {
7 | SET_NUMBER: (state, { number }) => ({ ...state, number }),
8 | },
9 | getters: {
10 | getNumber: ({ number }) => number,
11 | },
12 | });
13 |
14 | export default AppStore;
15 |
--------------------------------------------------------------------------------
/examples/create-react-app/src/AppStore.js:
--------------------------------------------------------------------------------
1 | import { createReducerStore } from 'fluxible-reducer-store';
2 |
3 | const AppStore = createReducerStore({
4 | storeName: 'AppStore',
5 | initialState: { number: 0 },
6 | reducers: {
7 | SET_NUMBER: (state, { number }) => ({ ...state, number }),
8 | },
9 | getters: {
10 | getNumber: ({ number }) => number,
11 | },
12 | });
13 |
14 | export default AppStore;
15 |
--------------------------------------------------------------------------------
/examples/create-react-app/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/packages/fluxible-addons-react/docs/api/useFluxible.md:
--------------------------------------------------------------------------------
1 | # useFluxible
2 |
3 | ```js
4 | import { useFluxible } from 'fluxible-addons-react';
5 | ```
6 |
7 | `useFluxible` is a React hook that returns the Fluxible component
8 | context.
9 |
10 | ## Example
11 |
12 | ```js
13 | const Component = () => {
14 | const { executeAction } = useFluxible();
15 |
16 | return