adonis icon indicating copy to clipboard operation
adonis copied to clipboard

Production Ready?

Open a9a4k opened this issue 8 years ago • 2 comments

Thanks a lot for the library!

I wanted to clarify a few things:

  1. Is it safe to use in a real project?
  2. Should I use master branch or v1.0 branch
  3. Does it support React Native
  4. Do you need help?

a9a4k avatar Apr 06 '17 06:04 a9a4k

Hey @almeynman,

thanks for your interest in adonis! Unfortunately, adonis is not production ready yet. We're currently using the v1.0 branch in the new version of PhotoEditorSDK, which is also still under development. The v1.0 branch is already pretty bullet-proof, but still not finished. There's just a few things missing in v1.0:

Extension of base styles, e.g.:

const A = adonis.css({
  background: 'red'
})
const B = adonis(A).css({
  color: 'white'
})

A smarter way of generating selector hashes

Right now, all properties except dynamic properties are taken into account for hash generation. So there's a problem with something like this:

const A = adonis.div({
  color: theme => theme.textColor
})
const B = adonis.div({
  color: theme => theme.otherTextColor
})

The selectors for these two components will exactly be the same, even though the actual color value differs. I've thought about some mustache-like syntax, such as:

const A = adonis.div({
  color: '{{textColor}}'
})

Adonis would automatically replace the {{textColor}} with theme.textColor, but it would take {{textColor}} for hash generation.

React Native support

I've never worked with React Native, so I don't know what it takes to support it. Maybe you can help out here :)

saschagehlich avatar Apr 06 '17 07:04 saschagehlich

Thanks @saschagehlich for a quick reply!

React Native

Regarding React Native support we can take styled components approach and move everything React Native related to 'adonis/native'. I will be happy to help you with that

Theming

Regarding theming, I currently use react-with-styles. So for me, it would be nice to have a seamless integration with react-with-styles. otherwise, I will need to change the setup in several projects.

Regarding your issue with selector hashes. Based on my humble knowledge of JS and of your problem and because the function is not really dynamic (only used for theming) I think you can get a return value of a function and use it for hashing purposes. I can't find any better advice than this, sorry...

There are also interesting features that can be added to a roadmap, all inspired by this blog post:

  1. child selectors (probably aphrodite's concern)
  2. grid support

a9a4k avatar Apr 06 '17 07:04 a9a4k