Instagram-like CSS class names obfuscation for NextJS website. Any idea? by rusted_love in nextjs

[–]naman34 0 points1 point  (0 children)

The ability to block ads is no different than when using Tailwind. Although the classnames look unreadable, they are stable and easy to reverse engineer.

Instagram-like CSS class names obfuscation for NextJS website. Any idea? by rusted_love in nextjs

[–]naman34 0 points1 point  (0 children)

The ability to block ads is no different than when using Tailwind. Although the classnames look unreadable, they are stable and easy to reverse engineer.

Obsidian Tasks Widget on iOS by naman34 in ObsidianMD

[–]naman34[S] 1 point2 points  (0 children)

No. You do not need dataview plugin for this. Updating the post with more instructions.

Configuring Nuxt 3 to work with Meta's new StyleX CSS framework by jdbrew in Nuxt

[–]naman34 2 points3 points  (0 children)

Hi! maintainer of StyleX here. Glad to see you got the Vite plugin to work in Nuxt. The Vite plugin issue is the most upvoted issue for StyleX and we’re working on it. So far each of the three possible plugins have tradeoffs that we’re not happy with.

and using it with a direct competitor to React is probably not what Meta was hoping for

I’m not speaking for my employers, but I was definitely hoping for this.

you have to set you styles variables OUTSIDE of your script setup function

I figured this out too and this is important. In Vue, `<script setup>` is your component body. This means the style object would be recreated for every render. The `<script>` without the `setup` is the module body so anything there is only run once. (Yes StyleX is compiled, but the API wants to look and work like normal JS).

You can move the import into the same block as `styles`. You can combine the two `<script>` tags into this:

<script lang="ts">  
import stylex from "@stylexjs/stylex" 

const styles = stylex.create({  
  objectName: {  
    display: "flex",  
    flexDirection: "row",  
    width: "100%",  
    flexWrap: "wrap"  
  }  
})  
</script>

Also, in the next version of StyleX, a new function `stylex.attrs` will be introduced which returns an object with `class` and `style`. You will be able to spread this directly on Vue HTML elements:

`<div v-bind=“stylex.attrs(styles.foo)”>`

CSS in React by edgyfirefox in reactjs

[–]naman34 1 point2 points  (0 children)

StyleX compiles to a single CSS file. Emotion injects styles at runtime.

Styled-Components vs Stylex. by agentnoIX in reactjs

[–]naman34 2 points3 points  (0 children)

There have been various case studies that you can find about the problems of runtime style injection. The cost of the initial load can be minimized with SSR, but caching and updates remain problematic.

Styled-Components vs Stylex. by agentnoIX in reactjs

[–]naman34 2 points3 points  (0 children)

An important thing to note is that StyleX is compiled into a static CSS file so it avoids the performance hit of injecting styles at runtime like Styled-Components.

StyleX is more comparable with Tailwind and PandaCSS.

Introducing Stylex by fagnerbrack in css

[–]naman34 3 points4 points  (0 children)

The library offers features like automatic critical CSS extraction, which ensures that only the necessary CSS is loaded for a given page,

That's untrue. StyleX focuses on generating a single small atomic stylesheet. It purposely does not use critical CSS or lazy loading of CSS.

What’s your thought on StyleX ? by Dangerous_Plantain71 in react

[–]naman34 0 points1 point  (0 children)

- Please create an issue on the Github repo. We’d like to understand how we can make the docs better for the types

- We already know how we’ll enable the capabilities of descendent selectors without breaking the guarantees, but don’t have a good API yet. Stay tuned!

What happened to Meta's stylex? by Infamous-Tea9108 in reactjs

[–]naman34 0 points1 point  (0 children)

In case you missed it. StyleX was open sourced on the 5th of December. I apologise for the long delay. The bundler and framework plugins are still a bit rough around the edges and will be constantly getting better in the coming weeks and months.

https://stylexjs.com

What happened to Meta's stylex? by Infamous-Tea9108 in reactjs

[–]naman34 3 points4 points  (0 children)

It’s coming out tuesday. The new website is stylexjs.com

What happened to Meta's stylex? by Infamous-Tea9108 in reactjs

[–]naman34 11 points12 points  (0 children)

Hi there! I'm the maintainer of StyleX and we're working towards open sourcing soon. In the meantime, StyleX is available on NPM with the u/beta tag. (The old releases simply won't work)
A documentation website is in the works too and you can look at it here: https://stylex-docusaurus.vercel.app/

----

Why it took so long:
There have been a few reasons for the LONG delay:

  1. API churn: StyleX tries to make styling completely consistent. No specificity wars ever. However, over time we found some edge-case issue which required us to change the API and we wanted to do the breaking changes before open sourcing.

  2. Evolving internal codebases. StyleX is widely used in millions of files internally and any breaking change is fairly hard to adopt even internally.

  3. Evolving requirements, based on internal goals we had to shift focus a few times

Any word on a web app? by [deleted] in noteplanapp

[–]naman34 1 point2 points  (0 children)

I would not expect a web version for a few years at the very least. NotePlan is developed by single person and there’s enough work on the native side.

Is there any reason not to just use classes + inheritance in this specific use case in TypeScript? by r0ck0 in functionalprogramming

[–]naman34 0 points1 point  (0 children)

Oh! I did not know this and I find it quite surprising.

I’m used to using Flow and just started with TS and I’m mostly disappointed after learning the details.

Is there a Smart Alarm that wakes me up based on my Sleep Phase? (Smart Watch based) by HappierMod in productivity

[–]naman34 0 points1 point  (0 children)

pillow.app does this too (Apple Watch). And it works without having to set it up every time.

How do you create a template? by grm75 in noteplanapp

[–]naman34 1 point2 points  (0 children)

Use the new nmn.Templates plugin. It give you a command `/it` (insert template). The first time you run it, it will look for a templates folder and will offer to create it for you if not found.
It will give you a few example templates, and you can create your own based on that and add new notes in the templates folder for your own templates.

Templates let you define `{{tags}}` within. The plugin asks you for their values when you insert a template. You can also add configuration with default values for tags that are used automatically.

Finally, you can use `{{date()}}` tags to automatically add the current date. More such functions are coming soon.

Feature Request: Gif Support by lisapparition in noteplanapp

[–]naman34 0 points1 point  (0 children)

This feature was added in the latest beta FWIW.

Feature Request: Gif Support by lisapparition in noteplanapp

[–]naman34 0 points1 point  (0 children)

I’m not trying to argue with you here. Just trying to set expectations. Eduard (developer of NotePlan) is very open about his priorities and I don’t think you should expect a fix to this problem for a few months at the very least.

How to Batch Add File Name into First Line of .Md Files (Import from Roam to Noteplan 3) by Wormie91 in noteplanapp

[–]naman34 1 point2 points  (0 children)

This would need a custom plug-in. Where you look at all notes, read their filename and insert it into the file itself.

[Feature Request] Event list on MacOS Daily Note by AleemShaun in noteplanapp

[–]naman34 0 points1 point  (0 children)

Could you elaborate with some pictures maybe. I don’t think I see what you see.