Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

[context] consider using context to pass more than just avenger instance #1

Closed
giogonzo opened this issue Jun 6, 2016 · 1 comment

Comments

@giogonzo
Copy link
Member

giogonzo commented Jun 6, 2016

requirements

currently we rely on avenger instance being provided via context,
but we require "all queries" and "all commands" to be passed at configuration time

this requires each project to re-export declareQueries and declareCommands configured/partially applied, and this is cumbersome

e.g.

// re-export.js
import allQueries from './queries';
import declareQueries from 'react-avenger/queries';
export default declareQueries(allQueries);

// components
import declareConnect from './re-export.js';

specs

consider the possibility of passing them via context instead

misc

{optional: other useful info}

@giogonzo
Copy link
Member Author

giogonzo commented Jun 9, 2016

problem: if we pass stuff through context we loose the ability to access queries.Type (or commands.Type) statically

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant