Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Separate "Model" and "Components" into separate modules (and repos)? #26

Closed
nicksrandall opened this issue Feb 22, 2016 · 2 comments
Closed
Labels

Comments

@nicksrandall
Copy link

Currently, draft-js has its dependencies listed as 'React' and 'ReactDOM' but it appears that only the "components" need those dependencies.

As somebody who would like to leverage the "model" features of this framework inside of a library other than React and ReactDOM, I would like to have the ability to include just the "model" code as a dependency in my project.

I'm curious what your thoughts are regarding splitting this framework into two separate modules, presumably one being the "model" layer and the other being the (react) "components" (which will depend on the model).

If it is decided that this change makes sense, I'm open to helping out via pull-requests, ect...

Please let me know what I can do to help.

@hellendag
Copy link

For launch, it made sense to introduce the project this way for simplicity. I'd like to hold off on splitting the module apart just to keep things straightforward for now, but I'm definitely excited to see non-React use cases for the model.

For now, we could create a model.js that exports the model pieces. Then, you could require('draft-js/model') and avoid implicitly requiring React modules.

@hellendag hellendag added the meta label Mar 1, 2016
@lacker
Copy link

lacker commented Dec 15, 2016

It seems like this isn't going to be in the plan for the foreseeable future, and the discussion has stopped, so I'm just going to close this issue as "wontfix". Thanks for bringing this up!

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

3 participants