Use react for plugin development
lifan0127 opened this issue · 4 comments
lifan0127 commented
Hi, I have seen some Zotero plugins built with React: https://github.com/diegodlh/zotero-cita
Is it supported by zotero-plugin-template? Thanks!
windingwind commented
Yes. To get the react instance: const React = ztoolkit.getGlobal("require")("react")
(or, Zotero.getMainWindow().require("react")
)
lifan0127 commented
Thanks, @windingwind Is there a zotero-plugin-template based plugin implemented in React that I can use as a guide?
windingwind commented
React is a framework to create UI components. If you are not doing a lot of reusable UI stuff, no need to use it.
lifan0127 commented
Thanks for the guidance!