Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

[Feature] Plugins #97

Open
Qolzam opened this issue Sep 28, 2018 · 1 comment
Open

[Feature] Plugins #97

Qolzam opened this issue Sep 28, 2018 · 1 comment
Assignees
Labels

Comments

@Qolzam
Copy link
Member

Qolzam commented Sep 28, 2018

No description provided.

@Qolzam Qolzam added this to the React Social Version 0.7.0 milestone Sep 28, 2018
@Qolzam Qolzam self-assigned this Sep 28, 2018
@Qolzam Qolzam added the Epic label Sep 28, 2018
@Qolzam Qolzam removed this from the React Social Version 0.7.0 milestone Apr 30, 2019
@Qolzam
Copy link
Member Author

Qolzam commented May 7, 2019

There is possble idea like using inversify.js however my idea is avoiding importing unused library.

I used craco to handle some features in webpack for v0.7.0. By that we can implement plugins feature. First we need to add a directory like src/plugins/plugin-name then each plugin can have yaml or json config file. Config file can be like :

{
  kind: redux.middleware.v1 
  main: index.js
  ...
}

We suppose this plugin should be added in redux middleware list in configureStore.*.ts.

We can add a separated file like reduxMiddleware.ts which export the list of middleware.

Possible steps could be:

  • From craco config file read the redux middleware plugins.
  • Add plugins import code to reduxMiddleware.ts file.
  • configureStore.*.ts will read the list of middleware.

What is your idea @kapilip?

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

No branches or pull requests

1 participant