---
title: "Discussion on \"React Native Custom Hooks - Part 1\" | Hashnode"
description: "Discussion on \"React Native Custom Hooks - Part 1\". - useEffectOnce\nimport { useEffect } from 'react';\n\nexport function useEffectOnce(cb) {\n  useEffect(cb, []);\n}\nExample\nimport { useEffectOnce } from './hooks';\n\nuseEffectOnce(() => {\n  console.log('Will be executed at first render only');\n});\n\n- useU..."
url: "https://hashnode.com/posts/react-native-custom-hooks-part-1/62ed0b9fe3a3793580dfd419"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [React Native Custom Hooks - Part 1](https://anasnmu.hashnode.dev/react-native-custom-hooks-part-1?utm_source=hashnode&utm_medium=feed)

\- useEffectOnce import { useEffect } from 'react'; export function useEffectOnce(cb) { useEffect(cb, \[\]); } Example import { useEffectOnce } from './hooks'; useEffectOnce(() => { console.log('Will be executed at first render only'); }); - useU...

Aug 5, 2022 · 2 min read · anasnmu.hashnode.dev  
Updated Aug 25, 2022  
Read the article

-   [#react-native](https://hashnode.com/tag/react-native)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)

## Written by

[Anas Nabil](https://hashnode.com/@anasnmu)

@anasnmu · Cairo, Egypt

  
[View profile](https://hashnode.com/@anasnmu)

Senior React Native Developer @ Nori Solutions

Experienced mobile app developer who has a track record of success creating apps that are both well-received and commercially viable. Skilled with working as a team and incorporating input into projects. Ability to always look for ways to improve upon an already existing app to keep people downloading it and enjoying it. Strong eye for detail and tenacity to never quit on something until it is absolutely perfect.

## Responses 1

Markdown supported · ⌘↵ to post

[Developer Avocado](https://hashnode.com/@AvocaDEV)

[Aug 7, 2022](https://hashnode.com/posts/react-native-custom-hooks-part-1/62ed0b9fe3a3793580dfd419/comment/62efe954ba649046e8d9029e)

Another great and clear article! [Anas Nabil](https://hashnode.com/@anasnmu)

[Anas Nabil](https://hashnode.com/@anasnmu)

[Aug 7, 2022](https://hashnode.com/posts/react-native-custom-hooks-part-1/62ed0b9fe3a3793580dfd419/comment/62efe954ba649046e8d9029e#reply-62f02621e3a3793580e03f72)

Thank you!
