red-gold / react-social-network

Simple React Social Network
https://medium.com/@qolzam/create-social-network-by-react-js-fe60010a32e6
MIT License
489 stars 484 forks source link

[Feature] Plugins #97

Open Qolzam opened 6 years ago

Qolzam commented 5 years ago

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:

What is your idea @kapilip?