ihh / abrowse

Multiple sequence alignment browser

Home Page:https://ihh.github.io/abrowse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor to allow use as a React component

ihh opened this issue · comments

c.f. #5

I found this library that can be helpful to convert a CRA to a publishable npm module

https://www.npmjs.com/package/create-react-library

It is nice because you can have your library that is publishable and have an "example" directory that uses CRA to demo it

It might not be the ultra-most-modern solution, perhaps something like tsdx is also good https://github.com/formium/tsdx @garrettjstevens ?

I like TSDX, and I'd certainly recommend it for creating a publishable React component. It's aimed at TypeScript, but works fine with JS if you add "allowJs": true to the tsconfig.json. You can set up TSDX to have an example directory and also a Storybook.

The create-react-library example dir works pretty nicely without a storybook. I do get a little bugged out by how many dependencies storybook brings in so avoiding that is a nice side product, but storybook is good for developing multiple components in isolation

The example directory in TSDX works without Storybook as well. It's a separate thing. When you're bootstrapping the library you can choose whether or not to have Storybook.

oh interesting. good to know