Code Monkey home page Code Monkey logo

Comments (6)

alloy avatar alloy commented on August 28, 2024

We're experimenting with ways to reuse the CSS for components in elan within reaction-force using a library like css-modules. However, it may make more sense to copy the styles directly into react components and just use styled-components.

I would prefer porting to the latter, because something like css-modules won’t work for if we’d ever want to share components between web and emission. Not that that’s definitely something we’ll be doing, but in order to know if it is a possibility we should try out the technologies that would be able to run on both platforms. (styled-components has RN support).

from reaction.

l2succes avatar l2succes commented on August 28, 2024

@alloy Right, that's a good point. Alright, question answered then. We can stick to styled-components and copy styles as appropriate.

cc @xtina-starr

from reaction.

alloy avatar alloy commented on August 28, 2024

It would be interesting to know by the end roughly how much of styling had to be ported.

from reaction.

yuki24 avatar yuki24 commented on August 28, 2024

Generally speaking, styles and components should be decoupled otherwise we wouldn't be able to use any of it in a static website. I'm still learning about React native, but there must be a way to share decoupled styles even with React Native.

from reaction.

l2succes avatar l2succes commented on August 28, 2024

@yuki24 That's actually not necessarily true in the age of components and css modules. To better grasp the design decisions and concepts behind CSS-in-JS. Check out the following talks. It helped me better understand why on you would embed css in your components.

React: CSS in JS
The case for CSS modules - Mark Dalgleish

from reaction.

mzikherman avatar mzikherman commented on August 28, 2024

Closing this since we have these base components done! We still have a few pieces for the loyalty page, but those are their own issues.

from reaction.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.