Migration to v2
React Native Migration
Upgrade @solar-icons/react-native to v2.
Try the codemod first
The V2 codemod can rewrite common React Native imports and report unsupported category, namespace, and prop patterns. Review its preview before applying the package and API changes below.
Import paths
After:
import { HomeIcon } from '@solar-icons/react-native/bold'size is always number
Before: size="32"
After: size={32}
Category imports removed
Before:
import { House } from '@solar-icons/react-native/category/buildings/Bold'After:
import { HouseIcon } from '@solar-icons/react-native/bold/house'No CSS variables
Values resolve through props or SolarProvider (React Context).
New: SolarProvider
import { SolarProvider } from '@solar-icons/react-native'
;<SolarProvider color="#3b82f6" size={24} strokeWidth={1.5}>
<App />
</SolarProvider>New: Duotone and stroke width
<HeartIcon secondaryColor="#f59e0b" secondaryOpacity={0.4} />
<SettingsIcon strokeWidth={2} />How is this guide?
Last updated on