# sections_fts_content

c0: upgrade/0-9-0/vue
c1: upgrade/0-9-0/vue
c2: Top level imports for hooks
c3:
All Jazz hooks are now available as top-level imports from the `jazz-vue` package.

This change improves IDE intellisense support and simplifies imports:

    {/* prettier-ignore */}
```typescript
<template>
  Hello {{ me.profile?.name }}
</template>

<script setup lang="ts">
  // Replace local imports with "jazz-vue" imports
  import { useAccount } from "./main"; // [!code --]
  import { useAccount } from "jazz-vue"; // [!code ++]

  const { me, logOut } = useAccount();
</script>
```


c0: upgrade/0-9-0/vue
c1: upgrade/0-9-0/vue
c2: New testing utilities
c3:
Removing `createJazzTestApp` also makes testing way easier!

We can now use `createJazzTestAccount` to setup accounts and testing data and pass it to
your components and hooks using `JazzTestProvider`:

      {/* prettier-ignore */}
      ```tsx
      import { createJazzTestAccount, JazzTestProvider } from "jazz-vue/testing";
      import { createApp, defineComponent, h } from "vue";
      import { usePlaylist } from "./usePlaylist";
      import { Playlist, MusicAccount } from "./schema"; // old

      // This can be reused on other tests!
      export const renderComposableWithJazz =  any>(
        composable: C,
        { account }: { account: Account | { guest: AnonymousJazzAgent } },
      ) => {
        let result;

        const wrapper = defineComponent({
          setup() {
            result = composable();
            // suppress missing template warning
            return () => {};
          },
        });

        // ✅ Use JazzTestProvider in your tests
        const app = createApp({
          setup() {
            return () =>
              h(
                JazzTestProvider,
                {
                  account,
                },
                {
                  default: () => h(wrapper),
                },
              );
          },
        });

        app.mount(document.createElement("div"));
        return [result, app] as [ReturnType, ReturnType<typeof createApp>];
      };

      test("should load the playlist", async () => {
        // ✅ Create a test account with your schema
        const account = await createJazzTestAccount({ AccountSchema: MusicAccount });

        // ✅ Set up test data
        const playlist = Playlist.create({
          name: "My playlist",
        }, account);

        // ✅ Set up test data
        const { result } = renderComposableWithJazz(() => usePlaylist(playlist.id), {
          account,
        });

        // The result is resolved synchronously, so you can assert the value immediately
        expect(result?.name).toBe("My playlist");
      });
      ```


c0: upgrade/react-native-local-persistence
c1: upgrade/react-native-local-persistence
c3:
# Enable local persistence

Version 0.9.2 introduces local persistence for React Native apps using SQLite. In version 0.12, we've separated the implementations for Expo and framework-less React Native.

If you are upgrading from a version before 0.9.2, you need to enable local persistence by following the steps below.

Local persistence is enabled by default in version 0.12 and higher.


c0: upgrade/react-native-local-persistence
c1: upgrade/react-native-local-persistence
c2: Choose your implementation
c3:
Depending on whether you're using Expo or framework-less React Native, you'll need to follow different steps:

- For Expo applications, refer to the [React Native - Expo](/docs/react-native-expo/project-setup) guide
- For framework-less React Native applications, refer to the [React Native](/docs/react-native/project-setup) guide


c0: upgrade/react-native-local-persistence
c1: upgrade/react-native-local-persistence
c2: Add the required dependencies
c3:
### For Expo

As SQLite package, Expo uses `expo-sqlite`. Install it with:

```bash
npx expo install expo-sqlite
npx expo install expo-secure-store
```

### For framework-less React Native

As SQLite package, we use `@op-engineering/op-sqlite` and `react-native-mmkv` for key-value storage:

```bash
npm install @op-engineering/op-sqlite react-native-mmkv
npx pod-install
```


c0: upgrade/react-native-local-persistence
c1: upgrade/react-native-local-persistence
c2: Update your JazzProvider
c3:
In version 0.12 and higher, you need to use either the `jazz-expo` package (for Expo) or the `jazz-react-native` package (for framework-less React Native). Local persistence is enabled by default in both packages.

To enable it, you need to pass the `storage` option to the `JazzProvider` component:

  ```tsx

  ```


