Best of React NativeAugust 2023

  1. 1
    Article
    Avatar of habrhabr·3y

    React Custom Hook: useArray

    "useArray" hook is one of the many carefully crafted hooks available in the collection of React custom hooks. The useArray hook uses the useState hook from React to manage the array state. The advantages of using this custom hook are twofold: it simplifies the management of array states and provides a cleaner and more readable code structure.

  2. 2
    Article
    Avatar of habrhabr·3y

    React Custom Hook: useAsync

    The useAsync hook takes in a callback function that performs the asynchronous operation and an optional array of dependencies. It returns an object with three properties: loading, error, and value. The hook employs the useState and useEffect hooks to manage the loading state and invoke the memoized callback function when necessary.

  3. 3
    Article
    Avatar of asayerasayer·3y

    React: Performing Authentication with JWT

    This article will discuss how to perform JWT authentication in a React app. We will cover the steps involved in setting up a backend JWT endpoint, signing up and signing in from your React app, and protecting routes with JWT validation. You will use a custom-built Express server API to relay the JWT token for a user.

  4. 4
    Article
    Avatar of habrhabr·3y

    React Custom Hook: useDarkMode

    "UseDarkMode" Hook is one of the many carefully crafted hooks available in the collection of React custom hooks. It combines two other handy hooks and, to provide a seamless dark mode experience. It automatically detects the user's preferred color scheme and persists the dark mode state in the browser's local storage.

  5. 5
    Article
    Avatar of communityCommunity Picks·3y

    HTMX: The Game-Changing Alternative to React

  6. 6
    Article
    Avatar of habrhabr·3y

    React Custom Hook: useClickOutside

    The useClickOutside hook is designed to simplify the process of detecting clicks outside a specified component. It listens for click events on the document level, allowing you to trigger a callback function when a click occurs outside the provided component's reference. It works seamlessly with functional components using the useState and useRef hooks.

  7. 7
    Article
    Avatar of reactnativeexampleReact Native Example·3y

    A Travel App UI in React Native with TailwindCSS

    Open it in the Expo app on your phone to view it. It will reload if you save edits to your files, and you will see build errors and logs in the terminal. It also attempts to open your app on a connected Android device or emulator.

  8. 8
    Article
    Avatar of habrhabr·3y

    React Custom Hook: useDebugInformation

    React Custom Hook: useDebugInformation is one of the many carefully crafted hooks available in the collection of React custom hooks. The hook tracks the number of renders, changed props, time since the last render, and the timestamp of the last rendering. UseDebugInformation can be applied in various scenarios.

  9. 9
    Article
    Avatar of habrhabr·3y

    React Custom Hook: useCookie

    React Custom Hook: useCookie is one of the many carefully crafted hooks available in the collection of React custom hooks. UseCookie allows you to effortlessly handle cookies by providing a concise interface. In scenarios where you need to remove a cookie, the deleteCookie function comes to the rescue.

  10. 10
    Article
    Avatar of habrhabr·3y

    React Custom Hook: useFetch

    React Custom Hook: useFetch is one of the many carefully crafted hooks available in the collection of React custom hooks. UseFetch handles the network request, parses the JSON response, and provides the resulting data. The hook also offers flexibility through its customizable options parameter.

  11. 11
    Article
    Avatar of habrhabr·3y

    React Custom Hook: useDebounce

    The useDebounce hook leverages the useTimeout hook internally to delay the execution of a callback function until a specified delay has passed. The hook takes care of managing the timeout and clears it when necessary, ensuring that the callback is only triggered after the specified delay and with the latest dependencies.

  12. 12
    Article
    Avatar of habrhabr·3y

    React Custom Hook: useCopyToClipboard

    The useCopyToClipboard hook streamlines the copy-to-clipboard functionality, providing developers with a hassle-free solution. The hook is incredibly versatile and can be employed in various scenarios. It is particularly useful in situations where copying text, such as URLs, shareable content, or user-generated data is required.

  13. 13
    Article
    Avatar of twirThis Week In React·3y

    This Week In React #156: Server Actions, Stale Closures, React Falls Behind, Expo Builds, Suspense Throttling, React-Aria, Natuerlich, Obsidiosaurus, Expo-SQLite, Expo DevTools...

    This Week In React #156: Server Actions, Stale Closures, React Falls Behind, Expo Builds, Suspense Throttling, React-Aria, Natuerlich, Obsidiosaurus, Expo-SQLite, Expo DevTools. This week, we've got many articles from the React and React-Native community.

  14. 14
    Article
    Avatar of habrhabr·3y

    React Custom Hook: useEventListener

    React Custom Hook: useEvent listener is one of the many carefully crafted hooks available in the collection of React custom hooks. The useEventListener hook is a versatile tool that can be used in a wide range of scenarios. With just a few lines of code, you can effortlessly handle keydown events and update the component's state accordingly.