Skip to content

Passing data deeply with context (100% finished) #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Oct 29, 2023
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
translate step 1: create a context
  • Loading branch information
habibium committed Sep 27, 2023
commit cffb161d54dd0ad70e581f88baefbae9641d877d
6 changes: 3 additions & 3 deletions src/content/learn/passing-data-deeply-with-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ Context একটি প্যারেন্টকে--এমনকি অন

</DiagramGroup>

### Step 1: Create the context {/*step-1-create-the-context*/}
### ধাপ ১: কনটেক্সটটি create করুন {/*step-1-create-the-context*/}

First, you need to create the context. You'll need to **export it from a file** so that your components can use it:
প্রথমে, আপনার কনটেক্সটটি create করতে হবে। আপনার একে **একটি ফাইল থেকে export করতে হবে** যাতে করে আপনার কম্পোনেন্টগুলো একে use করতে পারে:

<Sandpack>

Expand Down Expand Up @@ -308,7 +308,7 @@ export const LevelContext = createContext(1);

</Sandpack>

The only argument to `createContext` is the _default_ value. Here, `1` refers to the biggest heading level, but you could pass any kind of value (even an object). You will see the significance of the default value in the next step.
`createContext` এর একমাত্র আর্গুমেন্ট হলো _default_ ভ্যালু। এখানে `1` দ্বারা উদ্দেশ্য হলো সবচেয়ে বড় হেডিং লেভেল, কিন্তু আপনি যেকোনো ধরনের ভ্যালু (এমনকি একটি object) পাস করতে পারতেন। আপনি এই ডিফল্ট ভ্যালুর গুরুত্ব এর পরের ধাপে উপলব্ধি করতে পারবেন।

### Step 2: Use the context {/*step-2-use-the-context*/}

Expand Down