8/16/2023 0 Comments Reactxp peer dependencies![]() ![]() In most cases, a game or app was only developed for one of those machines (usually the Apple IIe or the C=64, sometimes both - maybe an Atari too), but the other systems were all considered "second tier" by most developers. I lived and played in those times back in the "second gen" if you will of the microcomputer days - you had games and apps by different companies, and developers. Supporting and maintaining multiple codebases for multiple platforms can be debilitating for a company, let alone a single developer. Supporting and maintaining a single codebase for one platform is a monumental task for any company, let alone a single indie developer. Instead, that application would have to be developed for only one, maybe two of the "major" platforms (and guess which platform it wouldn't be developed for - that would be the platform that I like most). It might even be a massive cost to me as a single developer.īy developing a cross-platform app using a single set of easy-to-use tools, a large audience of users can be gained, that would otherwise be prohibitively expensive to support if native-only was the mantra. It's instead the massive costs to my employer. I can't speak for others, but for me, the "massive costs" isn't about having to learn another language or framework. > I think all these "massive cost" comments come from sheer ignorance. Those "devs" are frightened at the need to learn a new language and frameworks, overestimate the time required to learn those, look around them and only see likewise clueless "devs", frightened of changes, and extrapolate some comically high overestimation of cost and time, when in reality, a properly written software is much more accessible to join in and support than a web "app" with the contemporary "sexy" observer pattern nonsense splattered all over, coupled with a horrible, horrible dependency management system and a language/framework combo that requires multiple dependencies to perform the most trivial of array loop. I think all these "massive cost" comments come from sheer ignorance. Learning frameworks takes much longer, obviously, but with the wealth of information available out there these days (Stack Overflow, message boards, blogs, etc.), "hacking" on new frameworks is also quite easy. If you are an experienced developer, moving from a language to a language is a matter of hours to days, depending on paradigm changes. A language is, after all, means to use the frameworks. Since that package file belongs to library itself (and not Storybook), it should correctly state its dependencies.I think, only a special kind of "developers" is afraid of learning languages. I ended up putting react and react-dom into peerDependencies as that is correct approach in my opinion. Should I just use externals property in configuration to exclude react and react-dom from the bundle? I guess it would work but then the package.json would still list React as its dependencies (which I do not want). I will be using webpack to actually bundle only the component code so it can be distributed. Since StorybookJS requires react and react-dom to run, I would have to include them as dependencies of the library. Index.ts // <- this is entry point of the package Create a static storybook site that I will host somewhere showcasing the components.Help during development to preview my components.I've decided for adding StorybookJS in the package for two reasons ![]() This package will then be used in other React-based projects so I will provide React myself in those projects. The package.json is using react and react-dom as peer dependencies because I only want to ship code for components only. I am creating my own React component library. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |