File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " bagon-hooks" ,
3- "version" : " 0.0.0 " ,
3+ "version" : " 0.0.1 " ,
44 "description" : " A collection of zero-dependency hooks for SolidJS forked directly from Mantine Hooks." ,
55 "license" : " MIT" ,
66 "author" : " Carlo Taleon" ,
Original file line number Diff line number Diff line change 1- import { Accessor , createEffect , createSignal } from 'solid-js' ;
1+ import { Accessor , createSignal , onMount } from 'solid-js' ;
22
33export type OS = 'undetermined' | 'macos' | 'ios' | 'windows' | 'android' | 'linux' ;
44
@@ -71,7 +71,7 @@ interface UseOsOptions {
7171export function useOs ( options : UseOsOptions = { getValueInEffect : true } ) : Accessor < OS > {
7272 const [ value , setValue ] = createSignal < OS > ( options . getValueInEffect ? 'undetermined' : getOS ( ) ) ;
7373
74- createEffect ( ( ) => {
74+ onMount ( ( ) => {
7575 if ( options . getValueInEffect ) {
7676 setValue ( getOS ) ;
7777 }
You can’t perform that action at this time.
0 commit comments