I'm working on a components library in React, that I'd like to use with any React framework (CRA, Next.js, Remix, etc.).
The main questions here are:
- How to approach links? I was thinking to implement
react-router
but this won't work withNext.js
, right? Should I use html links instead, and add a prop to the component to use thereact-router
one orNext
? - Same questions for other components of
react-router
: forPagination
component, I usecreateSearchParams
to navigate to the selected page. How to approach this? Should I create only the buttons and implement the logic for navigation in the apps I'll create? - For styling: I'm used to style everything with
styled-components
. For frameworks using SSR (Next
andRemix
) won't this be a problem? Would I need to installstyled
in these projects? Wouldn't it be better in this case to use CSS modules?
Thanks for your answers!
Top comments (0)