We have 3 sets of products that area each built on a different technology: React, React Native and Angular.
Because of this separation, multiple products end up looking and feeling different.
We would like to move to a shared look, which makes it clear that these products belong together.
However, we do not want to rewrite these products entirely, but would much rather rework the style for each of them.
The question: What strategies/approaches exist to share the same style and user-experience between these 3 technologies?
What we're worried about:
Research:
There's nothing inherently wrong with what you're suggesting, slicing the reuse at different levels brings different benefits and challenges. web-components is about as high level as you can go between React and Angular, if you want something lower that's cross platform, I suggest you look at design tokens, implemented using something like https://amzn.github.io/style-dictionary/
You can take this as far as you want - we use this to deliver common theme spacing, sizing, colours across Swift, Kotlin, React Native, Svelte and React, but you can go further and define more, just check out their examples. It offers a good way to have a JSON representation of a styled system with a native wrapper on top that consumes this.
You can checkout https://nx.dev. it's a powerful build tool that allows you to share components between angular and react project. explanation and example here: https://nx.dev/p/a/examples/react-and-angular
And as you mentioned you can use the created web-components in your react-native app and focus on managing them using services like bit.dev
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With