<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in UseUpdates.types.d.ts.map</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>9410ce0e - [expo-updates] Add rollback support to useUpdates() (#24071)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/expo-updates/build/UseUpdates.types.d.ts.map#9410ce0e</link>
        <description>[expo-updates] Add rollback support to useUpdates() (#24071)- New UpdateInfoType for rollbacks- Support for rollbacks in state machine# Test Plan- Unit tests and E2E test coverage added# Checklist&lt;!--Please check the appropriate items below if they apply to your diff.This is required for changes to Expo modules.--&gt;- [x] Documentation is up to date to reflect these changes (eg:https://docs.expo.dev and README.md).- [x] Conforms with the [Documentation Writing StyleGuide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)- [x] This diff will work correctly for `npx expo prebuild` &amp; EAS Build(eg: updated a module plugin).---------Co-authored-by: Will Schurman &lt;wschurman@expo.io&gt;

            List of files:
            /expo/packages/expo-updates/build/UseUpdates.types.d.ts.map</description>
        <pubDate>Thu, 24 Aug 2023 17:05:55 +0000</pubDate>
        <dc:creator>Douglas Lowder &lt;doug@expo.io&gt;</dc:creator>
    </item>
<item>
        <title>d80e7547 - [expo-updates] Catch error in initial native context read (#23640)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/expo-updates/build/UseUpdates.types.d.ts.map#d80e7547</link>
        <description>[expo-updates] Catch error in initial native context read (#23640)

            List of files:
            /expo/packages/expo-updates/build/UseUpdates.types.d.ts.map</description>
        <pubDate>Fri, 21 Jul 2023 17:07:48 +0000</pubDate>
        <dc:creator>Douglas Lowder &lt;doug@expo.io&gt;</dc:creator>
    </item>
<item>
        <title>39b67c84 - [expo-updates] New JS API useUpdates() (#23532)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/expo-updates/build/UseUpdates.types.d.ts.map#39b67c84</link>
        <description>[expo-updates] New JS API useUpdates() (#23532)`useUpdates()`, a simpler JavaScript API for `expo-updates`.- Wraps information on the currently running app bundle, and anyavailable or downloaded new updates- Reads from and receives change events from the native state machine,so it always reflects the current state of the native code- Can be called from any component in the application- Tracks the last time the device checked the update server for anavailable update- Existing async methods (`checkForUpdateAsync()`, `fetchUpdateAsync()`)can be called without waiting for results -- the hook will automaticallyrefresh when the methods complete## Example Usage```tsx UpdatesDemo.tsximport { StatusBar } from &apos;expo-status-bar&apos;;import * as Updates from &apos;expo-updates&apos;;import React from &apos;react&apos;;import { Pressable, Text, View } from &apos;react-native&apos;;export default function UpdatesDemo() {  const { currentlyRunning, availableUpdate, isUpdateAvailable, isUpdatePending } = Updates.useUpdates();  // If true, we show the button to download and run the update  const showDownloadButton = isUpdateAvailable;  React.useEffect(() =&gt; {    if (isUpdatePending) {      // Update has been successfully downloaded, so reload with the new update bundle      Updates.reloadAsync();    }  }, [isUpdatePending]);  // Show whether or not we are running embedded code or an update  const runTypeMessage = currentlyRunning.isEmbeddedLaunch    ? &apos;This app is running from built-in code&apos;    : &apos;This app is running an update&apos;;  return (    &lt;View style={styles.container}&gt;      &lt;Text style={styles.headerText}&gt;Updates Demo&lt;/Text&gt;      &lt;Text&gt;{runTypeMessage}&lt;/Text&gt;      &lt;Button pressHandler={() =&gt; Updates.checkForUpdateAsync()} text=&quot;Check manually for updates&quot; /&gt;      {showDownloadButton ? (        &lt;Button pressHandler={() =&gt; Updates.fetchUpdateAsync()} text=&quot;Download and run update&quot; /&gt;      ) : null}      &lt;StatusBar style=&quot;auto&quot; /&gt;    &lt;/View&gt;  );}function Button(props: { text: string; pressHandler: () =&gt; void }) {  const { text, pressHandler } = props;  return (    &lt;Pressable      style={({ pressed }) =&gt; {        return pressed ? [styles.button, styles.buttonPressed] : styles.button;      }}      onPress={pressHandler}&gt;      &lt;Text style={styles.buttonText}&gt;{text}&lt;/Text&gt;    &lt;/Pressable&gt;  );}```# How- New method `useUpdates()`- New supporting TS types# Test Plan- Unit tests included- E2E tests included- Manual testing# Checklist&lt;!--Please check the appropriate items below if they apply to your diff.This is required for changes to Expo modules.--&gt;- [x] Documentation is up to date to reflect these changes (eg:https://docs.expo.dev and README.md).- [x] Conforms with the [Documentation Writing StyleGuide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)- [x] This diff will work correctly for `expo prebuild` &amp; EAS Build (eg:updated a module plugin).

            List of files:
            /expo/packages/expo-updates/build/UseUpdates.types.d.ts.map</description>
        <pubDate>Mon, 17 Jul 2023 23:10:54 +0000</pubDate>
        <dc:creator>Douglas Lowder &lt;doug@expo.io&gt;</dc:creator>
    </item>
</channel>
</rss>
