Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open source the codemod that migrate from the old stylex syntax to the new stylex syntax #441

Open
SukkaW opened this issue Feb 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@SukkaW
Copy link
Contributor

SukkaW commented Feb 10, 2024

Describe the feature request

When stylex was first introduced at React Conf in 2019, its API looked like this:

const styles = stylex.create({
  red: {},
  blue: {}
});

<Button className={styles('red', blue && 'blue')} />

Upon its introduction, many projects attempted to replicate the concept, with the style9 doing an exceptional job.

Since then, stylex has evolved rapidly with significant changes to the API, while the community exploring ideas with projects like style9.

Since stylex is now open-sourced, I'm considering migrating my existing projects, which are currently powered by style9, to stylex. However, this transition would entail numerous modifications.

I understand that Facebook might use an internal codemod for this purpose. Is there any possibility of making it open-source?

@SukkaW SukkaW added the enhancement New feature or request label Feb 10, 2024
@nmn
Copy link
Contributor

nmn commented Feb 11, 2024

@SukkaW Our internal codemods are based on Flow which is not really used outside of Meta and would likely not be useful. Also this particular transition happened a long time ago. I'll see if I can find something useful, but the chances of that are pretty low.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants