Skip to main content

Command Palette

Search for a command to run...

SpiroKit for React Native 1.0.1 released

Updated
1 min read
SpiroKit for React Native 1.0.1 released

This new version includes IntelliSense improvements for the useTheme and useColorModeValue hooks.

Resources

useTheme improvements

useTheme is a custom hook inherited from NativeBase that allows you to access the theme object from the global context. This is useful when you need to get the value for a SpiroKit token like primary.500 or emerald.700.

This hook was already available with SpiroKit 1.0.0, but I made a slight improvement so you can get IntelliSense for the following tokens:

  • colors image.png

  • fontSizes image.png

  • letterSpacings image.png

  • lineHeights image.png

  • fontWeights image.png

More about this hook here: https://docs.spirokit.com/?path=/docs/getting-started-hooks--use-theme

useColorModeValue improvements

useColorModeValue is another custom hook inherited from NativeBase that can retrieve a value from parameters passed based on the active color mode (light/dark). SpiroKit also adds a third optional parameter that allows you to override the global color mode for a specific scenario.

This hook was already available with SpiroKit 1.0.0, but now you will get IntelliSense both for "light" and "dark" parameters: image.png

More about this hook here: https://docs.spirokit.com/?path=/docs/getting-started-hooks--use-color-mode-value

I hope you enjoy these few quality-of-life improvements.

Happy coding!

More from this blog

S

SpiroKit's Blog - React Native & Figma UI Library - Build industry-level mobile apps in no time

33 posts

SpiroKit is the ultimate React Native Toolkit Save months of work and focus on validating your ideas. Get lifetime access to the SaaS Kit + UI Kit + Figma & App templates