You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's great about Roc is that it promotes composition and extensibility. However I can't really find much about best practices on how to write your own extensions or how to simply extend an existing one.
Say, for example, that my team needs https://github.com/rocjs/roc-package-web-app-react but we'd also like to add Redux Saga and possibly other packages. What's the preferred approach here? I see two options:
simply add dependencies to the package.json alongside "roc-package-web-app-react"
fork the web-app-react extension and add the remaining packages
I'm tempted to go for option 2, but the lack of documentation about creating extensions is a concern.
Any thoughts?
Thanks!
The text was updated successfully, but these errors were encountered:
is probably nice for getting things up and running very quick, or for evaluating something before you want to provide it as something composable (package or plugin). In the particular case of redux-saga i recall that integrating it with the react composition is non-trivial, this is on our todo list I believe - @dlmr ?
you probably dont want to do this. it is better to create an entirely new package that extends roc-pakage-web-app-react, adjusting what you need. Or to create a plugin that adds the enhancements you prefer. Then you use that. Forking is fine with templates, but should be avoided with extensions (to avoid fragmentation).
I think a guide/showing the creation of a new extension by example will be nice. If you have an ideas or inspiration we could use as a format for this, please let us know and we will try to take it into account!
In the particular case of redux-saga i recall that integrating it with the react composition is non-trivial, this is on our todo list I believe - @dlmr ?
I think we best support redux-saga officially in roc-package-web-app-react since as stated it is not all that straight forward and a tight integration here will be beneficial. We have a old branch where we have implemented this as a POC that should be quite straight forward to base this feature on now that we have landed the next branch.
What's great about Roc is that it promotes composition and extensibility. However I can't really find much about best practices on how to write your own extensions or how to simply extend an existing one.
Say, for example, that my team needs
https://github.com/rocjs/roc-package-web-app-react
but we'd also like to add Redux Saga and possibly other packages. What's the preferred approach here? I see two options:"roc-package-web-app-react"
I'm tempted to go for option 2, but the lack of documentation about creating extensions is a concern.
Any thoughts?
Thanks!
The text was updated successfully, but these errors were encountered: