Git Product home page Git Product logo

Comments (3)

Zn4rK avatar Zn4rK commented on June 3, 2024 1

👍 Sounds like a plan! Let me know if you run in to any problems if you do decide to try out Navita!

One important USP that Navita has is that it does not require you to use the same transpilation steps that your framework uses. This project does have an swc-plugin, but you don't have to use swc to use it. Navita will take care of that.

I plan on replacing swc with oxc and ezno at some point for more speed and even better static code extraction.

from navita.

Zn4rK avatar Zn4rK commented on June 3, 2024

Hi!

Thank you for your kind words @paulm17! I've missed your issue completely - sorry!

Running @navita/css without an adapter is currently not supported, and would be the same as issue #2.

Eventually I could see myself building support for a runtime adapter. I can definitely see the use case for it.

If you need an adapter we don't support today, I'm willing to add it.

To answer your questions:

  1. This would be possible, but it's important to note that Navita does not have a runtime, so anything you declare in your app would essentially be "static" styling. You can still use dynamic styling, and there are a few different approaches of this in the vite example directory.

  2. The way it works is per file basis, we run a transformation to find any known identifiers. "style" from "@navita/css" for example (this list is extensible btw, so you can hook into the engine if you want). When it finds an identifier, it evaluates the expressions in it, and saves it to a store. Then, on an adapter basis, only styles that are actually used in your project is generated. The tests in packages/core will give you some more information I think. But yes, it would work over file boundaries.

I use Navita in a few very large projects, mainly in Next.js-projects. And it has first class support for Next.js.
Apart from panda-css, Facebook has now released Stylex, which has been an inspiration for this project. But it doesn't have very good Next.js support yet (facebook/stylex#309), but it might be more suited for what you want to do, since they do have a runtime support :)

from navita.

paulm17 avatar paulm17 commented on June 3, 2024

@Zn4rK Thanks for the reply! Appreciate it.

Good to hear about 1 and 2.

Re: an adapater. I think it's better to hold off for now. Whilst StyleX due to design decisions isn't a great fit for my needs. Griffel https://github.com/microsoft/griffel with RSC support should be fine.

If not. Then perhaps I'll take another look at @Navita and go from there.

I'll close this issue now.

from navita.

Related Issues (15)

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.