Giter Club home page Giter Club logo

react-native-unistyles's Introduction

react-native-unistyles react-native-unistyles-3.0

GitHub package.json version npm downloads npm downloads License: MIT
platform - expo platform - web platform - ios platform - macos platform - appletv platform - visionos platform - android platform - androidtv platform - windows platform - ssr


Features

  • ๐Ÿš€ Shared core with C++ and JSI bindings
  • ๐ŸŒ‰ Supports new architecture and bridgeless mode
  • ๐Ÿ”ฅ Crazy performance, adds under 0.1 ms to your StyleSheet
  • ๐ŸŽณ Share up to 100% of your styles across platforms in monorepo
  • ๐ŸŽฏ Doesn't introduce new components, everything is packed in one hook
  • โš›๏ธ No React Context
  • ๐Ÿ–ฅ๏ธ Supports custom breakpoints, css-like media queries and variants
  • ๐ŸŽจ Register multiple themes and change them with single function call
  • ๐Ÿฅณ Compatible with most popular platforms
  • ๐Ÿ›ก๏ธ ~99% Test coverage
  • ๐Ÿ”Œ Extend stylesheets with your own plugins
  • โš”๏ธ No 3rd party dependencies
  • and much much more!

Sponsors

How to become a sponsor?

codemask galaxies-dev kmartinezmedia mobily levibuzolic

UI Kits

Stacks

Installation

yarn add react-native-unistyles

Benchmarks

Discord

Looking for help or you want to chat with me?

Join Discord

Sponsor my work

If you found the react-native-unistyles time-saving and valuable, please consider sponsoring my work. Your support enables me to continue creating libraries with a fresh approach.

Github: https://github.com/sponsors/jpudysz

Ko-fi: https://ko-fi.com/jpudysz

Your support is greatly appreciated and helps me dedicate more time and resources to creating quality libraries. Thank you for all the support!

License

MIT

react-native-unistyles's People

Contributors

brentlok avatar danstewart avatar davidesegullo avatar dhatguy avatar efoken avatar efstathiosntonas avatar jpudysz avatar junedomingo avatar justblender avatar levibuzolic avatar michalzuk avatar migueldaipre avatar ngocle2497 avatar schriker avatar sharifhh avatar unaisdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

react-native-unistyles's Issues

[2.3.0] java.lang.UnsatisfiedLinkError

Description

It only appeared once in a huge user base and it happened on MainActivity#onResume() on Android 13 Samsung S20 FE 5G:

java.lang.UnsatisfiedLinkError: No implementation found for void com.unistyles.UnistylesModule.nativeOnOrientationChange(int, int) (tried Java_com_unistyles_UnistylesModule_nativeOnOrientationChange and Java_com_unistyles_UnistylesModule_nativeOnOrientationChange__II) - is the library loaded, e.g. System.loadLibrary?
        at com.unistyles.UnistylesModule.nativeOnOrientationChange(UnistylesModule.kt:-2)
        at com.unistyles.UnistylesModule.onConfigChange$lambda$0(UnistylesModule.kt:51)
        at com.unistyles.UnistylesModule.$r8$lambda$Y5cS3iwg3AGCEcfvPfDYHsquXR0(Unknown)
        at com.unistyles.UnistylesModule$$ExternalSyntheticLambda0.run(Unknown:4)
        at android.os.Handler.handleCallback(Handler.java:942)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:234)
        at java.lang.Thread.run(Thread.java:1012)

Steps to reproduce

  1. Can't reproduce it

Snack or a link to a repository (optional)

No response

Unistyles version

2.3.0

React Native version

0.73.4

Platforms

Android

Engine

Hermes

Architecture

Paper (old)

top insets wrong value not same as safe area insets

Description

The insets value of top is showing wrong it is not same as useSafeAreaInsets some times it shows fine and some time when app is opened with killed state notificaion

Steps to reproduce

create new react native app install unistyles and safe area context match both insets value it will be different check in the repro

Snack or a link to a repository (optional)

https://github.com/dhruv-00/unistyles-repro

Unistyles version

2.5.1

React Native version

0.73.6

Platforms

Android

Engine

JSC

Architecture

Paper (old)

Calling synchronous methods on native modules is not supported in Chrome

Description

I am using react-native-unistyles version 2.0.0 but have some problems when starting debug.

image

Steps to reproduce

  1. npm install react-native-unistyles
  2. Follow the set up guide for react native
  3. open devtools (Debug JS Remotely or Open Debugger(Flipper))

Snack or a link to a repository (optional)

No response

Unistyles version

2.0.0

React Native version

0.72.6

Platforms

Android, iOS

Engine

Hermes

Architecture

Paper (old)

beta.4

  • Handle transform types to pass media queries
  • improve TypeScript typings
  • rename createStyles to createStyleSheet - to be dicussed
  • improve docs with themes and variants
  • double check other nested styles like shadowOffset

No auto suggestions on stylesheet properties

Observation
When creating styles using the native Stylesheet, I get hints as I type for properties e.g fontFamily, color, etc! As seen in the image below
image

How ever, when creating styles using createStyles, I either only get suggestions for the first property only or none at all(see image below)
image

Environment
Node version: v18.15.0
Operating system: MacOS Sonoma
Editor: VSCode
Unistyles version: ^1.0.0-beta.1
Framework: Expo + typescript (expo router)

File structure


//styles.ts

import { breakpoints } from "constants/breakpoints";
import { theme } from "constants/theme";
import { createUnistyles } from "react-native-unistyles";

export const { useStyles, createStyles } = createUnistyles<
  typeof breakpoints,
  typeof theme
>(breakpoints);

export { theme };

// example usage

import { Text, View } from "components/base";
import { createStyles, useStyles } from "libs/styles";

export default function TabOneScreen() {
  const { styles } = useStyles(styleSheet);

  return (
    <View style={styles.container}>
      <Text style={styles.title}>Tab One</Text>
    </View>
  );
}

const styleSheet = createStyles((theme) => ({
  container: {
    flex: 1,
    alignItems: "center",
    justifyContent: "center",
    backgroundColor: theme.colors.light,
  },
  title: {
    fontSize: 42,
    color: "black",
  }
}));

[android]: adaptive themes not updates on start

Description

I configured unistyles with dark and light theme, but when I change dark mode on my device or android emulator, theme is not changes. Theme only changes if app is opened and then I change dark mode but if I close app and opened then by default will be initialTheme.

Example:

// unistyles.ts

const light = {
  colors: {
    primary: '#673AB7',
    secondary: '#f7f9fc',
    background: '#ffffff',
    text: '#1E1E1E',
  },
} as const;

const dark = {
  colors: {
    primary: '#673AB7',
    secondary: '#1E1E1E',
    background: 'rgb(1, 1, 1)',
    text: '#fcfcfc',
  },
} as const;

type Theme = {
  light: typeof light;
  dark: typeof dark;
};

UnistylesRegistry.addThemes({ light, dark }).addConfig({
  adaptiveThemes: true,
  initialTheme: 'light',
});
//index.js

import './lib/unistyles';
import { AppRegistry } from 'react-native';
import { App } from './src/app';

AppRegistry.registerComponent(appName, () => App);

I use UnistylesRuntime with useColorScheme how as temporary solution for fix this behavior now.

// App.tsx

  const scheme = useColorScheme();

  useEffect(() => {
    UnistylesRuntime.setTheme(scheme === 'dark' ? 'dark' : 'light');
  }, [scheme]);

Steps to reproduce

  1. setup unistyles with adaptive themes
  2. close application (need use cold start)
  3. turn on dark mode on your device
  4. open app (you will see that dark theme is not applied)

Snack or a link to a repository (optional)

No response

Unistyles version

2.0.0

React Native version

0.73.2

Platforms

Android

Engine

Hermes

Architecture

Paper (old)

Incomplete color normalization

Description

The new color normalization added in #50 has broken react-native-web shadow styling for some colour formats.

// for now supports
// hex colors (3, 6, 8) chars
// colors like orange red etc.

Based on the comments in the commit it looks like it's known that it's an incomplete implementation.

I imagine to stay in-sync with what React Native itself supports, it'd make sense to add a peerDependency to @react-native/normalize-colors which is the underlying utility library that React Native uses to pre-parse colours and then mix-in the alpha channel where required.

I'd be happy to create a PR with that implementation if that approach is suitable.

Steps to reproduce

  1. Use a shadowColor of black with an opacity of 0.5
  2. Observe output colour is black without opacity

Snack or a link to a repository (optional)

No response

Unistyles version

1.1.0

React Native version

0.72.6

Platforms

React Native Web

[Bug] Dynamic styling function with a callback

Dynamic styling functions do not work if a callback function is passes as argument to createStyles

<View style={[stylesheet.container, stylesheet.post(1)]}>
    <Text>foo</Text>
</View>
const stylesheet = createStyles((theme) => ({
  container: {
    flex: 1,
    backgroundColor: 'blue',
    alignItems: 'center',
    justifyContent: 'center'
  },
  post: (index: number) => ({
    backgroundColor: 'yellow'
  })
}))
This error is located at:
    in App (created by withDevTools(App))
    in withDevTools(App)
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in main(RootComponent), js engine: hermes
 ERROR  TypeError: stylesheet.post is not a function (it is undefined)

[V2] UNISTYLES_ERROR_RUNTIME_UNAVAILABLE

Description

Getting error UNISTYLES_ERROR_RUNTIME_UNAVAILABLE coming from node_modules/react-native-unistyles/src/Unistyles.ts:18

if (!isInstalled) {
            throw new Error(UnistylesError.RuntimeUnavailable)
}

Steps to reproduce

simulator_screenshot_06A84A8D-0F9A-47B3-B1F3-8D20ED8627BB

Snack or a link to a repository (optional)

https://github.com/atanaskanchev/rnu2

Unistyles version

next

React Native version

0.72.6

Platforms

iOS

Wrong styles type provided by useStyles which has stylesheet with Platfrom.select(...)

Description

The platform-specific style property gets defaulted to ColorValue when we use Platform.select({ android: {...}, ios: {...}, ... }) inside stylesheet.

Steps to reproduce

  1. Create stylesheet using Platform API
const stylesheet = createStyleSheet({
  toastContainer: {
    opacity: 1,
    minHeight: 60,
    ...Platform.select({
      ios: {
        shadowRadius: 12,
        shadowOpacity: 0.1,
        shadowOffset: { width: 0, height: 1 },
        shadowColor: "black",
      },
      android: {
        elevation: 1,
      },
      default: {},
    }),
  },
});
  1. Use the styles in any View component
const { styles, theme } = useStyles(stylesheet);

<View style={styles.toastContainer} />
  1. All the later platform styles type will be defaulted to ColorValue, here elevation type is defaulted to ColorValue.

Screenshot 2024-01-18 at 2 33 16โ€ฏPM
Screenshot 2024-01-18 at 2 33 44โ€ฏPM

Snack or a link to a repository (optional)

No response

Unistyles version

2.0.0

React Native version

0.73.2

Platforms

Android, iOS, React Native Web

Engine

Hermes

Architecture

Paper (old)

Unistyles runtime is not available. Make sure you followed the installation instructions

Description

Hello team, I encountered an error while testing my component with Jest. It seems like there might be an issue with my configuration, but I'm having trouble resolving it. Could you please take a look?

Screenshot 2024-03-10 at 5 00 40โ€ฏPM

Steps to reproduce

  1. Go to project root directory
  2. run script -->>> npm run test

Snack or a link to a repository (optional)

https://github.com/CodeBrewLabs7/BrewRNKit/tree/unistyle/template

Unistyles version

2.4.0

React Native version

0.73.5

Platforms

Android, iOS

Engine

Hermes

Architecture

Paper (old)

Issue with Theme Persistence When Navigating Back Between Components

Description

Description:
I am encountering an issue in a scenario where navigation occurs among three components, each assigned with a unique theme. The components and their respective themes are as follows:

Component A: Theme A
Component B: Theme B
For each component, upon its initial load, I utilize the UnistylesRuntime.setTheme method to set the corresponding theme. This approach is functioning correctly for the initial load of each component. However, a problem arises when using the router.back method for backward navigation. For example, if I navigate back from Component B to Component A, the theme does not update accordingly and remains set to Theme C, despite the expectation that it should switch to Theme B.

This issue seems occur with backward navigation since previous page is currently loaded. Any insights or solutions to ensure the correct theme is applied when navigating back would be appreciated.

Steps to reproduce

  1. Component A.
const ComponentA = () => {
  // I also tried this
  // React.useLayoutEffect(() => { 
  //   UnistylesRuntime.setTheme(("themeA")
  // }, [])

  // or this
  // React.useEffect(() => { 
  //   UnistylesRuntime.setTheme(("themeA")
  // }, [])

  UnistylesRuntime.setTheme(("themeA")

  return (
    <View>
      <Link href={'componentB'}/>
      <Text>Component A Theme A</Text>
    </View>
  );
};
  1. Component B.
const ComponentB = () => {
  UnistylesRuntime.setTheme(("themeB")

  // expo-router
  const router = useRouter() 

  return (
    <View>
      <Text>Component B Theme B</Text>
      <Button onPress={() =>router.back()}>Go back</Button>
    </View>
  );
};

Snack or a link to a repository (optional)

No response

Unistyles version

2.0.0-alpha.11

React Native version

^0.72.6

Platforms

iOS

fontVariant doesn't work

Description

Hello,
The fontVariant style doesn't work in unistyles as it appears to always be undefined.

Steps to reproduce

  1. Create a style with fontVariant: ['tabular-nums'] for instance and use it on a Text component. The example is on iOS as the numbers in the default Android font already have the same size but the issue is the same with other fonts.
import { type FC } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { createStyleSheet, useStyles } from 'react-native-unistyles';

export const MenuView: FC = () => {
  const { styles } = useStyles(stylesheet);

  return (
    <View style={styles.screen}>
      <View style={styles.container}>
        <View>
          <Text>Stylesheet</Text>
          <Text style={rnStylesheet.text}>000000</Text>
          <Text style={rnStylesheet.text}>111111</Text>
          <Text style={rnStylesheet.text}>222222</Text>
        </View>
        <View>
          <Text>Unistyles</Text>
          <Text style={styles.text}>000000</Text>
          <Text style={styles.text}>111111</Text>
          <Text style={styles.text}>222222</Text>
        </View>
      </View>
    </View>
  );
};

const rnStylesheet = StyleSheet.create({
  text: {
    fontVariant: ['tabular-nums'],
  },
});

const stylesheet = createStyleSheet({
  container: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    width: 200,
  },
  screen: {
    alignItems: 'center',
    backgroundColor: 'white',
    flex: 1,
  },
  text: {
    fontVariant: ['tabular-nums'],
  },
});
  1. The font is still the default one
    image

  2. When inspecting the text styled with unistyles, fontVariant is undefined.
    image

Snack or a link to a repository (optional)

No response

Unistyles version

2.5.0 (happened in 2.4.0 also)

React Native version

0.73.4 (Expo 50.0.6)

Platforms

Android, iOS

Engine

Hermes

Architecture

Paper (old)

SSR media query hydration error

Description

Hydration error with media queries:
image

Component:
<View style={styles.linksContainer}> ... </View>

Styles:
`linksContainer: { display: { xs: 'none', xl: 'flex', }, flexDirection: 'row', },

On the first render on the desktop (xl size) the linksContainer is hidden, even though it shouldn't be. Moreover, if I resize the window to a smaller, and then to a larger screen size (xl+), the media query seems to start working.

Steps to reproduce

I'm using https://solito.dev/expo-router started pack.
Installed unistyles to packages/app directory.
Write a component with some css media queries.

Snack or a link to a repository (optional)

No response

Unistyles version

1.1.1

React Native version

Platforms

React Native Web

[Help wanted] Transform types

Hey ๐Ÿ‘‹

I have one open issue to be picked up by someone, I'm looking for typescript type that will handle following case:

const stylesheet = createStyles(theme => ({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: {
            sm: theme.colors.oak,
            md: theme.colors.aloes,
            ':w[800]': theme.colors.fog
        },
        // this works ok
        transform: [
            {
                scale: 3
            }
        ],
        shadowColor: theme.colors.oak,
        shadowOffset: {
            width: 0,
            height: {
                sm: 10,
                md: 20
            }
        },
        shadowOpacity: 0.3,
        shadowRadius: 4
    }
}))

but

const stylesheet = createStyles(theme => ({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: {
            sm: theme.colors.oak,
            md: theme.colors.aloes,
            ':w[800]': theme.colors.fog
        },
        // this works in JS but is rejeted by TS
        transform: [
            {
                scale: 3
            },
           {
                translateX: {
                    sm: 20,
                    md: 40
                }
            }
        ],
        shadowColor: theme.colors.oak,
        shadowOffset: {
            width: 0,
            height: {
                sm: 10,
                md: 20
            }
        },
        shadowOpacity: 0.3,
        shadowRadius: 4
    }
}))

Can not be downloaded from yarn registry

Description

I tried to install the library with this command yarn add react-native-unistyles but i got error like
An unexpected error occurred: "https://registry.yarnpkg.com/react-native-unstyles: Not found".

Please help me.

Steps to reproduce

  1. Run this command yarn add react-native-unistyles
  2. Getting not found error

Snack or a link to a repository (optional)

No response

Unistyles version

2.2.0

React Native version

0.72.6

Platforms

Android, iOS, React Native macOS

Engine

Hermes

Architecture

Fabric (new)

.web files breaks loading from import maps

Description

Unistyles 2.0 does not current load in browsers due to native files loading UnistylesModule.ts and useCSS.ts instead of UnistylesModule.web.ts and useCSS.web.ts.

Normally you could setup esbuild to load those web extensions, but you cannot in the browser. An easy fix is to remove the web extensions to make those the default and use .native to override.

Steps to reproduce

  1. Use Unistyles 2.0 in an import map
  2. Note registry failure and files loaded via network

Snack or a link to a repository (optional)

No response

Unistyles version

2.0.0-rc.1

React Native version

Platforms

React Native Web

Engine

None

Architecture

Paper (old)

Quick glitch/transition showing light mode temporarily (when I am already in dark mode) - when refreshing or first loading the page in react native web (via expo)

Description

Quick glitch/transition showing light mode temporarily (when I am already in dark mode) - when refreshing or first loading the page in react native web (via expo) ; toggling dark-light mode via the actual dark-light mode toggle works fine

glitch.mov

Steps to reproduce

  1. Run npx create-expo-app my-app and choose Navigation (Typescript) for expo-router version
  2. Follow the setup guide at unistyles setup page
  3. Add code to test light-dark mode (sample given in unistyles doc)
  4. Run yarn web and try to refresh the web page

Snack or a link to a repository (optional)

No response

Unistyles version

2.0.0

React Native version

0.72.6

Platforms

React Native Web

Engine

Hermes

Architecture

Paper (old)

Color Themes

Whats the best way to do color themes like darkmode and lightmode?

Current way from the docs I can think is switching the whole theme thats passed into the provider.

If there is currently no best way, im happy to do a PR with examples (+ any code if needed).

Media query issue

Description

From the example below from xs to xl everything works fine, same from xl to superLarge. Starting from superLarge breakpoint styles are not applied.

export function HomeScreen() {
  const { styles } = useStyles(stylesheet)
  return (
    <View>
      <Text style={styles.text}>lorem</Text>
    </View>
  )
}

const stylesheet = createStyleSheet({
  text: {
    color: {
      xs: 'red',
      xl: 'yellow',
    },
  },
})

Steps to reproduce

  1. install https://solito.dev/starter pack
  2. install unistyles into packages/app, add react-native-unistyles to next.config.js into transpilePackages
  3. copy & past unistyles config from the docs with breakpoints (the number 2000 is not that important, it could be 2300)
  4. update HomeScreen component from the example

Snack or a link to a repository (optional)

No response

Unistyles version

1.1.4

React Native version

Platforms

React Native Web

UnistylesRuntime.colorScheme is not update

Description

switch theme to dark or light not update correctly

export const useSwitchTheme = () => {
    const themeColor = UnistylesRuntime.colorScheme;
    const switchTheme = useNonReactiveCallback(() => {
        UnistylesRuntime.setTheme(themeColor === 'light' ? 'dark' : 'light');
    });
    const switchToDarkTheme = useCallback(() => {
        UnistylesRuntime.setTheme('dark');
    }, []);
    const switchToLightTheme = useCallback(() => {
        UnistylesRuntime.setTheme('light');
    }, []);

    return {
        switchTheme,
        themeColor,
        switchToDarkTheme,
        switchToLightTheme,
    };
};

Steps to reproduce

click switch color schema based on UnistylesRuntime.colorScheme light or dark but after setTheme value is not updated
is this intent not to be reactive update ?

Snack or a link to a repository (optional)

No response

Unistyles version

react-native-unistyles": "^2.0.0-rc.3

React Native version

0.72.6

Platforms

Android

Engine

Hermes

Architecture

Paper (old)

box shadows on iOS not working

Thanks for the library. I'm excited to see this get to an official release soon.

I've run into this small issue. Not sure if it is something on my end I'm missing but box shadows on iOS are not being applied correctly. Changing the offset width and height has no effect.

When I apply the same to the button directly I get the expected results.

const stylesheet = createStyles((theme) => ({
  padButton: {
    backgroundColor: theme.colours.white,
    borderRadius: 30,
    elevation: 14,
    shadowColor: theme.colours.black,
    shadowOffset: {
      width: 0,
      height: 4,
    },
    shadowOpacity: 0.3,
    shadowRadius: 4,
    height: PAD_WIDTH,
    width: PAD_WIDTH,
    justifyContent: 'center',
  },
}));
 

SSR with NextJS and Unistyles

Description

The question was reported here: #48 , and I was able to reproduce it. There are two areas for improvement:

  • The useDimensions hook,
  • The import to the preprocessor from react-native-web.

I was able to patch it quickly, but I need to conduct more tests to find a proper solution.

unistyles.mp4

Steps to reproduce

  1. Import react-native-unistyles in a project with NextJS
  2. Run it

Snack or a link to a repository (optional)

No response

Unistyles version

1.0.0

React Native version

0.72

Platforms

React Native Web

"Cannot convert undefined or null to object" when `shadowOffset` is undefined

Description

The error Cannot convert undefined or null to object is thrown when shadowOffset style is present by undefined

Steps to reproduce

function useTest() {
    useStyles(stylesheet);
}

const stylesheet = createStylesheet({
    test: {
        shadowOffset: undefined,
    },
});

Snack or a link to a repository (optional)

No response

Unistyles version

1.1.1

React Native version

0.72.5

Platforms

Android, iOS, React Native Web

[Discussion] Compound variants

First of all, kudos for the library, awesome work ๐Ÿ‘

I've got a question on the recommended approach for handling compound styles.

Lets say we have a button outer shell

const ButtonRoot = styled(TouchableOpacity, {
  display: "flex",
  flexDirection: "row",
  justifyContent: "center",
  alignItems: "center",
  width: 200,
  padding: 12,
  variants: {
    type: {
      solid: {},
      outline: {
        borderWidth: 1,
      },
    },
    colorScheme: {
      primary: {},
      positive: {},
      negative: {},
    },
  },
},
});

How should we handle the compound variants in a dynamic styling function?

 compoundVariants: {
    "outline+primary": {
      borderColor: "#087ea4",
    },
    "outline+positive": {
      borderColor: "#527717",
    },
    "outline+negative": {
      borderColor: "#ff393f",
    },
    "solid+primary": {
      backgroundColor: "#087ea4",
    },
    "solid+positive": {
      backgroundColor: "#527717",
    },
    "solid+negative": {
      backgroundColor: "#ff393f",
    }

No implementation found for void.com.unistyles

Description

WhatsApp.Video.2023-12-30.at.03.40.59.mp4

Steps to reproduce

  1. Init a fresh project with official expo template
  2. add react-native-unistyles
  3. Build using EAS
  4. Launch app and swith theme

Snack or a link to a repository (optional)

No response

Unistyles version

^2.0.0-rc.4

React Native version

0.72.6

Platforms

Android

Engine

Hermes

Architecture

Paper (old)

Support array style

Description

export const theme = {
  colors: {
    blood: '#eb4d4b',
    barbie: '#e056fd',
    pumpkin: '#f0932b',
    background: '#ffffff'
  },
  components: {
    typography: {
      bold: {
        fontWeight: 'bold'
      },
      thin: {
        fontWeight: '300'
      }
    }
  }
}

Can u support array theme like this?

const stylesheet = createStyleSheet(theme => ({
    textName:[theme.components.typography.bold, {color:theme.colors.blood}]
}))

Steps to reproduce

see my code above

Snack or a link to a repository (optional)

No response

Unistyles version

1.0.0

React Native version

0.72.5

Platforms

Android, iOS

Hot reloading with custom plugins throws error

Description

Error: You are trying to register a plugin with a name that is already registered

` public addPlugin = (plugin: UnistylesPlugin, notify: boolean = true) => {
if (plugin.name.startsWith('__unistyles')) {
throw new Error(UnistylesError.InvalidPluginName)
}

    if (this.plugins.some(({ name }) => name === plugin.name)) {
        throw new Error(UnistylesError.DuplicatePluginName)
    }

    this.plugins = [plugin].concat(this.plugins)
    this.unistylesBridge.addPlugin(plugin.name, notify)
}`

Fails on this.plugins = [plugin].concat(this.plugins)

Steps to reproduce

  1. Create the following plugin:
import type { UnistylesPlugin } from "react-native-unistyles";

export const fontFamilyPlugin: UnistylesPlugin = {
  name: "fontFamilyPlugin",
  onParsedStyle: (key, styles, runtime) => {
    styles.fontFamily = "Noto Sans";

    return styles;
  },
};
  1. Add it to the Unistyles config:
import { UnistylesRegistry } from "react-native-unistyles";

import { breakpoints } from "./breakpoints";
import { fontFamilyPlugin } from "./plugins/fontFamilyPlugin";
import { darkTheme, lightTheme } from "./themes";

export const initializeUnistyles = () =>
  UnistylesRegistry.addThemes({
    light: lightTheme,
    dark: darkTheme,
  })
    .addConfig({
      adaptiveThemes: true,
      plugins: [fontFamilyPlugin],
    })
    .addBreakpoints(breakpoints);

  1. Run your expo app on the iOS simulator
  2. Make a code change after launch and save so that the app hot reloads
  3. Error

Snack or a link to a repository (optional)

No response

Unistyles version

2.3.0

React Native version

0.73.4

Platforms

iOS

Engine

Hermes

Architecture

Paper (old)

theme from useStyes() without stylesheet assumes type as never

Description

I am not sure if this is a setup issue on my part or not, however I am noticing that intellisense in my IDE is typing the theme object that comes from the useStyles return object as never.

Apologies if this is not legitimate, I'm just trying to help point out a possible bug

Steps to reproduce

  1. call useStyles without explicitly providing a stylesheet and destructure theme

Snack or a link to a repository (optional)

No response

Unistyles version

2.0.1

React Native version

0.72.6

Platforms

Android, iOS

Engine

Hermes

Architecture

Paper (old)

Breakpoint not hydrated after SSR render

Description

Breakpoint not hydrated

scroll-2024-01-23_15.25.38.webm

Steps to reproduce

Clone repo
pnpm i
pnpm dev
got to localhost:3000
in first load, breakpoint not apply, rezise with screen, breakpoint will hydrate when detect changed

Snack or a link to a repository (optional)

https://github.com/lobor/breakpoint-unistyle-repro

Unistyles version

2.1.0

React Native version

0.73.0

Platforms

SSR

Engine

Hermes

Architecture

Paper (old)

Not Working In Chrome Debugger

Description

I tried opening the debugger in Chrome Browser It Threw error it said
Unistyles runtime is not available. Make sure you followed the installation instructions

Steps to reproduce

use unistyles in any react native project try opening the chrome debugger with
NativeModules.DevSettings.setIsDebuggingRemotely(true);
add this is index.js and don't forget to import NativeModules.
then you will see that error in chrome console

Snack or a link to a repository (optional)

No response

Unistyles version

^2.2.0

React Native version

0.72.6

Platforms

Android, iOS

Engine

Hermes

Architecture

Paper (old)

[Feature Request] Navigate to style key upon middle click

@jpudysz HI, don't know if this is possible to achieve or not, currently we cannot middle click the style and navigate directly to it on the createStyleSheet method on IntelliJ/Webstorm IDE (it should fail on VSCode is suppose).

With StyleSheet.create this was possible but now that the useStyles intervenes it fails to navigate, IDE won't even colorize the key on styles.whatEver.

Screenshot at Oct 12 12-20-58

Screen.Recording.2023-10-12.at.12.21.56.mov

ps. I think you should enable Discussions on the repo to avoid issue polution

web states ( hover, focus, active)

Hi, thanks a lot for the lib,I really like the approach and how it stays as close as possible to StyleSheet.

I have a question: is it possible somehow to to create styles for the "pseudo states" (in web) - like hover, focus, active ?

Thank you ๐Ÿค—

Use Bun for Github Actions

Description

Some time ago, I tried using Bun for CI/CD and encountered some issues. Now is the best time to re-validate Bun's compatibility with Unistyles.

Steps to reproduce

  1. Try to run some CI/CD actions

Snack or a link to a repository (optional)

No response

Unistyles version

2.0.0

React Native version

0.73.0

Platforms

Android, iOS, React Native Web, SSR

Engine

Hermes

Architecture

Paper (old)

PlatformColor gets converted to undefined by parseStyle function

Description

We are using PlatformColor for setting all colors inside our app. But when we pass a style object to createStyleSheet, then these PlatformColor gets converted to undefined. And hence the color does not gets applied to component. This is only happening for Android and iOS, web is working fine.

After digging into code, I found the reason. It was because inside parseStyle function we are checking if we see style properties value as object, then we proceed assuming that the value is for breakpoints, which is a valid assumption as per this library objective. But, this is where PlatformColor breaks. Since, PlatformColor value is also an object, the value gets converted to undefined by getValueForBreakpoint function in breakpoints.ts.

I am not sure what is the correct way to fix it. I can think of two ways to fix it.

First, we add checks for PlatformColor and return value as it is inside parseStyle function. This is the patch that I made for myself and patching this library locally.

diff --git a/node_modules/react-native-unistyles/src/utils/styles.ts b/node_modules/react-native-unistyles/src/utils/styles.ts
index c35c333..c44b242 100644
--- a/node_modules/react-native-unistyles/src/utils/styles.ts
+++ b/node_modules/react-native-unistyles/src/utils/styles.ts
@@ -97,6 +97,16 @@ export const parseStyle = <T, B extends Breakpoints>(
                     return [key, value]
                 }
 
+                // if the value is a PlatformColor Object, we don't want to parse it
+                if (value && typeof value === 'object' && value.hasOwnProperty('semantic')) {
+                    return [key, value]
+                }
+
+                // or on Android the property to check is resource_paths
+                if (value && typeof value === 'object' && value.hasOwnProperty('resource_paths')) {
+                    return [key, value]
+                }
+
                 return [
                     key,
                     getValueForBreakpoint<B>(

Second, we can return the value as it is, instead of returning undefined, inside breakpoints.ts file's getValueForBreakpoint function.

    return breakpointPairs.length > 0
        ? value[availableBreakpoints[availableBreakpoints.length - 1] as keyof B & string]
        : undefined

Steps to reproduce

  1. Define a PlatformColor
  2. Pass PlatformColor value to any style property
  3. console.log after useStyles hook to see that PlatformColor value is converted to undefined.

Snack or a link to a repository (optional)

No response

Unistyles version

1.1.6

React Native version

0.72.6

Platforms

Android, iOS

I got an error on my APK build

Description

On my application .apk build I got the next error

Build fingerprint: 'Redmi/begonia_ru/begonia:10/QP1A.190711.020/V12.0.8.0.QGGRUXM:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2024-03-06 11:38:41+0200
pid: 6602, tid: 6696, name: mqt_js >>> com.testapp<<<
uid: 10409
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'Throwing new exception 'no "I" field "height" in class "Lcom/unistyles/Dimensions;" or its superclasses' with unexpected pending exception: java.lang.NoSuchFieldError: no "I" field "width" in class "Lcom/unistyles/Dimensions;" or its superclasses
at void com.unistyles.UnistylesModule.nativeInstall(long, com.unistyles.Dimensions, java.lang.String, java.lang.String, com.unistyles.Insets, com.unistyles.Dimensions, com.unistyles.Dimensions) (SourceFile:-2)
at boolean com.unistyles.UnistylesModule.install() (SourceFile:-1)
at void com.facebook.jni.NativeRunnable.run() (SourceFile:-2)
at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:914)
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:100)
at void com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(android.os.Message) (SourceFile:-1)
at void android.os.Looper.loop() (Looper.java:224)
at void com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run() (SourceFile:-1)
at void java.lang.Thread.run() (Thread.java:919)

Steps to reproduce

Screenshot_2024-03-06-11-51-09-639_com google android keep

Snack or a link to a repository (optional)

No response

Unistyles version

2.4.0

React Native version

0.73.0

Platforms

Android

Engine

Hermes

Architecture

Paper (old)

Fatal Exception: java.lang.UnsatisfiedLinkError

Description

Firebase Crashlytics in my app reported this crash:

Fatal Exception: java.lang.UnsatisfiedLinkError: No implementation found for void com.unistyles.UnistylesModule.nativeDestroy() (tried Java_com_unistyles_UnistylesModule_nativeDestroy and Java_com_unistyles_UnistylesModule_nativeDestroy__)
       at com.unistyles.UnistylesModule.nativeDestroy(UnistylesModule.kt)
       at com.unistyles.UnistylesModule.onCatalystInstanceDestroy(UnistylesModule.kt:76)
       at com.facebook.react.bridge.BaseJavaModule.invalidate(BaseJavaModule.java:71)
       at com.facebook.react.bridge.ModuleHolder.destroy(ModuleHolder.java:109)
       at com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceDestroy(NativeModuleRegistry.java:86)
       at com.facebook.react.bridge.CatalystInstanceImpl$1.run(CatalystInstanceImpl.java:353)
       at android.os.Handler.handleCallback(Handler.java:942)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
       at android.os.Looper.loopOnce(Looper.java:201)
       at android.os.Looper.loop(Looper.java:288)
       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:234)
       at java.lang.Thread.run(Thread.java:1012)

Steps to reproduce

no steps.

Snack or a link to a repository (optional)

No response

Unistyles version

2.5.3

React Native version

0.73.6

Platforms

Android

Engine

Hermes

Architecture

Paper (old)

Add documentation for V1

Description

Some users still use Version 1 of Unistyles. It would be great to host the old MDX somewhere. Currently, it's not possible with Astro Starlight, but it can surely be achieved.

Steps to reproduce

Validate documentation site

Snack or a link to a repository (optional)

No response

Unistyles version

2.0.0

React Native version

0.73.0

Platforms

Android, iOS, React Native Web

Engine

Hermes

Architecture

Paper (old)

ESLint: React Hook useStyles requires an effect callback. Did you forget to pass a callback to the hook?(react-hooks/exhaustive-deps)

Description

when trying to const { theme } = useStyles() it throws this typing error:

ESLint: React Hook useStyles requires an effect callback. Did you forget to pass a callback to the hook?(react-hooks/exhaustive-deps)

Related to

  • Unistyles core
  • Demo
  • Docs
  • Typings

Steps to reproduce

Expected behavior

As per docs, we should be able to use const { theme } = useStyles() without passing anything to the hook.

Actual behavior

throws typing errors

More Info

Screenshots/Video

Screenshot 2023-10-12 at 16 21 12

Environment

  • React Native version: 0.72.5
  • react-native-unistyles version: latest rc

Affected platforms

  • Android
  • iOS
  • Web

Invalid module name in augmentation, module react-native-unistyles cannot be found.

Description

Hi,

I followed the set up process to use unistyles with Expo (with dev client) and when I try to override the library types I get the following errors (see comment bellow) :

export const lightTheme = {
	colors: {
		typography: "#000000",
		background: "#ffffff",
	},
	margins: {
		sm: 2,
		md: 4,
		lg: 8,
		xl: 12,
	},
} as const;

export const darkTheme = {
	colors: {
		typography: "#ffffff",
		background: "#000000",
	},
	margins: {
		sm: 2,
		md: 4,
		lg: 8,
		xl: 12,
	},
} as const;

export const breakpoints = {
	xs: 0,
	sm: 576,
	md: 768,
	lg: 992,
	xl: 1200,
	superLarge: 2000,
	tvLike: 4000,
} as const;

// if you defined breakpoints
type AppBreakpoints = typeof breakpoints;

// if you defined themes
type AppThemes = {
	light: typeof lightTheme;
	dark: typeof darkTheme;
};

// override library types
declare module "react-native-unistyles" { // TS2664: Invalid module name in augmentation, module react-native-unistyles cannot be found.
	export interface UnistylesBreakpoints extends AppBreakpoints {} // An interface declaring no members is equivalent to its supertype.
	export interface UnistylesThemes extends AppThemes {} // An interface declaring no members is equivalent to its supertype.
}

(About the question "Which architecture do you use?", I don't know how how to check which one I use.)

Steps to reproduce

  1. npx expo install react-native-unistyles@next
  2. Follow the set up guide up to 3.4 Call UnistylesRegistry
  3. Run the app

Snack or a link to a repository (optional)

No response

Unistyles version

2.0.0-rc.4

React Native version

0.72.6

Platforms

iOS

Engine

Hermes

Architecture

Fabric (new)

[iOS] UnistylesRuntime.screen.height return value equal to width

Description

With UISupportedInterfaceOrientations support, when the iOS phone has a locked portrait orientation, the UnistylesRuntime.screen.height is equal to the UnistylesRuntime.screen.width. After unlocking the orientation the values seem to update properly. But still, with the unlocked orientation, the bug is reproducible initially until the phone's gyroscope values change (move a bit in any direction)

<key>UISupportedInterfaceOrientations</key>
<array>
	<string>UIInterfaceOrientationLandscapeLeft</string>
	<string>UIInterfaceOrientationLandscapeRight</string>
	<string>UIInterfaceOrientationPortrait</string>
	<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
2024-01-23.11.55.44.mp4

Steps to reproduce

  1. Setup the unistyles according to the doc
  2. Into the Info.plist add the UISupportedInterfaceOrientations key with all possible orientations
  3. Lock the Portait orientation in the phone settings
  4. In the App.tsx retrieve the width and height from the UnistylesRuntime.screen, and display some layout accordingly

Snack or a link to a repository (optional)

No response

Unistyles version

2.1.0

React Native version

0.72.6

Platforms

iOS

Engine

Hermes

Architecture

Fabric (new)

[android] Throwing new exception

Description

Hello, I'm receiving this error after building (expo dev client - sdk 50) and launching the app.

Edit: using version 2.3.0 it works.

thread.cc:2372] Throwing new exception 'no "I" field "height" in class "Lcom/unistyles/Dimensions;" or its superclasses' with unexpected pending exception: java.lang.NoSuchFieldError: no "I" field "width" in class "Lcom/unistyles/Dimensions;" or its superclasses
thread.cc:2372]   at void com.unistyles.UnistylesModule.nativeInstall(long, com.unistyles.Dimensions, java.lang.String, java.lang.String, com.unistyles.Insets, com.unistyles.Dimensions, com.unistyles.Dimensions) (SourceFile:-2)
thread.cc:2372]   at boolean com.unistyles.UnistylesModule.install() (SourceFile:-1)
thread.cc:2372]   at void com.facebook.jni.NativeRunnable.run() (SourceFile:-2)
thread.cc:2372]   at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:938)
thread.cc:2372]   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:99)
thread.cc:2372]   at void com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(android.os.Message) (SourceFile:-1)
thread.cc:2372]   at boolean android.os.Looper.loopOnce(android.os.Looper, long, int) (Looper.java:201)
thread.cc:2372]   at void android.os.Looper.loop() (Looper.java:288)
thread.cc:2372]   at void com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run() (SourceFile:-1)
thread.cc:2372]   at void java.lang.Thread.run() (Thread.java:920)
thread.cc:2372] 

Steps to reproduce

  1. Build app with expo dev client
  2. Launch the app

Snack or a link to a repository (optional)

No response

Unistyles version

^2.4.0

React Native version

0.73.4

Platforms

Android

Engine

Hermes

Architecture

Paper (old)

[Feature suggestion] Inbuilt variants management

It will be great if we can have variants management build into createStyleSheet. It would greatly simplify flow and bring it closer to the way tailwind variants are handled in libs like cva. I couldn't find any standalone react-native library that can handle stylesheet variants. Something in the lines of:

 {variants: {
    // We have added the "type" variant that allows you to define whether
    // the button will be solid or outline.
    type: {
      solid: {},
      outline: {
        borderWidth: 1,
      },
    },
    // Now, the style applied by the color scheme depends on the button type,
    // so we will define it in compound variants.
    colorScheme: {
      primary: {},
      positive: {},
      negative: {},
    },
  },
  //To define styles for a combination of variants, you just need to create a rule
  //by concatenating the involved variants with a '+'.
  compoundVariants: {
    "outline+primary": {
      borderColor: "#087ea4",
    },
    "outline+positive": {
      borderColor: "#527717",
    },
    "outline+negative": {
      borderColor: "#ff393f",
    },
    "solid+primary": {
      backgroundColor: "#087ea4",
    },
    "solid+positive": {
      backgroundColor: "#527717",
    },
    "solid+negative": {
      backgroundColor: "#ff393f",
    },
  },}

Breakpoints don't work when not using Theme

Description

Breakpoints inside createStylesheet() don't work when the theme is not used / it's not returned as a function

๐Ÿ”ด can't work:

const stylesheet = createStyleSheet({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: {
            sm: 'cyan',
            md: 'magenta'
        },
    },
};

๐ŸŸข working correctly:

const stylesheet = createStyleSheet(() => ({
  container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: {
            sm: 'cyan',
            md: 'magenta'
        },
    },
}));

Steps to reproduce

  1. Try modif this example
  2. Check switch to potrait & landscape mode on real device or emulator

Snack or a link to a repository (optional)

https://github.com/jpudysz/react-native-unistyles/tree/main/examples/expo

Unistyles version

2.0.0

React Native version

0.73.0

Platforms

Android

Engine

Hermes

Architecture

Paper (old)

Dynamic functions ignore variants

Description

When describing a stylesheet using dynamic functions, variants are ignored.
The linked repository includes two branches demonstrating the issue on a simple Text component with variants.

In both branches the component is used in the identical way:

import { Text } from '../ui/text'
import { View } from 'react-native'

export default function HomePage() {
  return (
    <View style={{ padding: 70 }}>
      <View>
        <Text variant="title">Title</Text>
      </View>
      <View>
        <Text variant="body">Body</Text>
      </View>
    </View>
  )
}

The main branch contains the component with stylesheets declared as an object as follows:

import { Text as NativeText, TextProps as NativeTextProps } from 'react-native'
import { createStyleSheet, useStyles } from 'react-native-unistyles'

type TextProps = NativeTextProps & {
  variant?: 'body' | 'title'
  color?: 'neutral' | 'primary'
}

export function Text({ variant = 'body', color = 'neutral', ...props }: TextProps) {
  const { styles } = useStyles(stylesheet, {
    variant,
    color,
  })

  return <NativeText {...props} style={styles.root} />
}

const stylesheet = createStyleSheet((theme) => ({
  // NOTE - `root` is an object
  root: {
    fontStyle: 'italic',

    variants: {
      variant: {
        title: {
          fontSize: 90,
        },
        body: {
          fontSize: 18,
        },
      },
      color: {
        neutral: {
          color: theme.colors.neutral,
        },
        primary: {
          color: theme.colors.primary,
        },
      },
    },
  },
}))

The result is as expected. Both texts are italicized. The first one is of a large size, while the second one is smaller:
Simulator Screenshot - iPhone 15 Pro - 2023-12-20 at 13 45 12

The dynamic_funcs branch contains the same component, but the stylesheet is defined as a function:

import { Text as NativeText, TextProps as NativeTextProps } from 'react-native'
import { createStyleSheet, useStyles } from 'react-native-unistyles'

type TextProps = NativeTextProps & {
  variant?: 'body' | 'title'
  color?: 'neutral' | 'primary'
}

export function Text({ variant = 'body', color = 'neutral', ...props }: TextProps) {
  const { styles } = useStyles(stylesheet, {
    variant,
    color,
  })

  return <NativeText {...props} style={styles.root()} />
}

const stylesheet = createStyleSheet((theme) => ({
  // NOTE - `root` is a function
  root: () => ({
    fontStyle: 'italic',

    variants: {
      variant: {
        title: {
          fontSize: 90,
        },
        body: {
          fontSize: 18,
        },
      },
      color: {
        neutral: {
          color: theme.colors.neutral,
        },
        primary: {
          color: theme.colors.primary,
        },
      },
    },
  }),
}))

The result of the above code is weird. Both texts are still italic, meaning that the common fontStyle: 'italic' was applied. However, the variants are completely ignored, reverting text sizes and colors to their default values:
Simulator Screenshot - iPhone 15 Pro - 2023-12-20 at 13 46 52

Steps to reproduce

  1. Clone https://github.com/b4lk0n/unistyles-dynamic-functions-variants
  2. Install dependencies via yarn
  3. Staying on the main branch, launch the app by yarn ios
  4. Observe the large "Title" and smaller "Body" words, both are italic
  5. git switch dynamic_func
  6. Reload app
  7. Observe the variants styles for the words "Title" and "Body" have gone

Snack or a link to a repository (optional)

https://github.com/b4lk0n/unistyles-dynamic-functions-variants

Unistyles version

2.0.0-rc.2

React Native version

0.72.6

Platforms

iOS

Engine

Hermes

Architecture

Fabric (new)

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.