Coder Social home page Coder Social logo

reactjs / tr.reactjs.org Goto Github PK

View Code? Open in Web Editor NEW
161.0 15.0 168.0 152.45 MB

React documentation website in Turkish

Home Page: https://tr.react.dev

License: Creative Commons Attribution 4.0 International

JavaScript 32.72% CSS 7.40% HTML 0.28% Shell 0.01% TypeScript 59.59%

tr.reactjs.org's Issues

`memo` isn't stopping re-rendering in React when switching between tabs?

I am using memo both on outer component as well as on each of the tab components.

Here is my CommonContainer.tsx:

import { Card, Divider, Grid, Spinner, Tabs, Text } from '@geist-ui/core'
import { memo, useCallback, useState } from 'react'
function CommonContainer(props: Props) {
  return (
    <Card width="100%">
      <Card.Content>
        <Tabs value="p1">
            <Tabs.Item label="P2" value="p2">
              <div >
                <P2QueryTab meta={props.metaList[0]} question={props.question}/>
              </div>
            </Tabs.Item>
            <Tabs.Item label="P1" value="p1">
              <div >
                <P1QueryTab meta={props.metaList[0]} question={props.question}/>
              </div>
            </Tabs.Item>
        </Tabs>
      </Card.Content>
    </Card>
  )
}

export default memo(CommonContainer)

Here is my P2QueryTab.tsx:

import { memo, useEffect, useCallback, useState } from 'react'
import Browser from 'webextension-polyfill'
function P2QueryTab(props: Props) {
  const [answer, setAnswer] = useState<Answer | null>(null)


  useEffect(() => {
    const port = Browser.runtime.connect()
    const listener = (msg: any) => {
      if (msg.text) {
        setAnswer(msg)
      }
    }
    port.onMessage.addListener(listener)
//This postMessage in turn will call external API to get data 
    port.postMessage({ question: props.meta + ' ' + props.question, displayTab: "Insights" })
    return () => {
      port.onMessage.removeListener(listener)
      port.disconnect()
    }
  }, [props.question])


  if (answer) {
    return (
      <div id="answer" dir="auto">
        {answer.text}
      </div>
    )
  }

  return <p className="animate-pulse">Waiting for P2...</p>
}

export default memo(P2QueryTab)

Here is my P1QueryTab.tsx:

import { memo, useEffect, useCallback, useState } from 'react'
import Browser from 'webextension-polyfill'
function P1QueryTab(props: Props) {
  const [answer, setAnswer] = useState<Answer | null>(null)

  useEffect(() => {
    const port = Browser.runtime.connect()
    const listener = (msg: any) => {
      if (msg.text) {
        setAnswer(msg)
      }
    }
    port.onMessage.addListener(listener)
//This postMessage in turn will call external API to get data 
    port.postMessage({
      question: props.meta + ' ' + props.question
    })
    return () => {
      port.onMessage.removeListener(listener)
      port.disconnect()
    }
  }, [props.question])

  if (answer) {
    return (
      <div id="answer" dir="auto">
        {answer.text}
      </div>
    )
  }

  return <p className="animate-pulse">Waiting for P1...</p>
}

export default memo(P1QueryTab)

I have gone through this and this and this and this but still my problem is unsolved.

  • most people facing this issue is due to key but I don't have key, I have only 2 props: meta and question which are guaranteed to be same as i visited a tab las time around.
  • this answer doesn't rely on memo and does the css trick explicitly himself. Not sure his Typography component uses any memorisation at all. But before going that route I need to understand why don't memo work in my case, why isn't the custom comparator even getting called.
  • Some blamed geist-ui tabs so I switched to react-tabs, but result is still the same.

Translation for parent/child

Translation for parent is ebeveyn. But this might be confusing and not frequently used. This situation also valid for child translation. You can vote by clicking:
For parent translation:



For child translation:


New Turkish Translation Progress

Çeviri Yapmadan Önce Lütfen Aşağıdaki Kuralları Okuyunuz

Çeviri yapma süreci üç adımda gerçekleştirilir:

  1. Kontrol listesinde kimsenin işaretlemediği bölümleri seçiniz. Altındaki yorumları kontrol ederek emin olunuz. İpucu: CTRL+F ile istediğiniz bölümle ilgili arama yaparak kontrol edebilirsiniz.

  2. Hangi sayfayı çevireceğinizi yorum kısmına yazınız. Lütfen bir seferde birden fazla sayfa almayınız!

  3. Projeyi yerel makinenize clone'layınız. Sayfayı çevirdiğinizde commit ederek, pull request gönderiniz.

  4. Commit mesajlarini ingilizce yaziniz.

  5. Commit mesajlarinda gecmis zaman formu kullanmayiniz. translated tutorial page yerine translate tutorial page. ya da fixed a typo in docs yerine fix a typo in docs.

Tercüme etmeden önce, çeviri kurallarını mutlaka okuyunuz.

İlgili tartışmalara dahil olmak için Slack #tr kanalına katılın.

💡 Repoda Discussions kismi enable edildi. Soru-cevap ya da fikir alisverisi gibi konular icin orayi kullanabiliriz.

Maintainer List

For New Translators

To translate a page:

  1. Check that no one else has claimed your page in the checklist and comments below.
  2. Comment below with the name of the page you would like to translate. Please take only one page at a time.
  3. Clone this repo, translate your page, and submit a pull request!

Before contributing, read the glossary and style guide (once they exist) to understand how to translate various technical and React-specific terms.

Please be prompt with your translations! If you find that you can't commit anymore, let the maintainers know so they can assign the page to someone else.

For Maintainers

When someone volunteers, edit this issue with the username of the volunteer, and with the PR. Ex:

[x] Home Page (@tesseralis) #12345

When PRs are merged, make sure to mark that page as completed!

Main Content

To do before releasing as an "official" translation. Please translate these pages first.

Note that each section has an index page, which needs to be translated too.

Learn React

API Reference

Navigation and UI

We suggest to leave most of the UI translation until the end. We plan to do some invasive changes to the website folder layout and components, so postponing this until your translation is almost complete would make it easier to merge the changes from our side later. It might make sense to translate the homepage above the fold early, but leave the rest for later. As individual pages get translated, you can change the page titles in the corresponding sidebar files. Finally, when you're translating the navigation, make sure to test both desktop and mobile layouts.

  • Homepage (currently in HomeContent.js) (@turkerdev) #404
  • Sidebars (currently in src/sidebar*.json)
  • Top-level navigation (currently in TopNav.tsx) (@alioguzhan) #504

When You're Ready...

After everything above is translated, add your language to deployedLanguages in Seo.tsx of the original reactjs/react.dev repository.

Secondary Content

These API pages should ideally be translated too, but they're less urgent and can be done after the others:

  • Legacy React APIs
    • Children
    • cloneElement
    • Component
    • createElement
    • createFactory
    • createRef
    • isValidElement
    • PureComponent

Optional Content

These aren't the main translation targets, but if you'd like to do them, feel free to expand the list to include their subpages:

[OLD] Legacy Turkish Translation Progress

Çeviri Yapmadan Önce Lütfen Aşağıdaki Kuralları Okuyunuz

Çeviri yapma süreci üç adımda gerçekleştirilir:

  1. Kontrol listesinde kimsenin işaretlemediği bölümleri seçiniz. Altındaki yorumları kontrol ederek emin olunuz. İpucu: CTRL+F ile istediğiniz bölümle ilgili arama yaparak kontrol edebilirsiniz.

  2. Hangi sayfayı çevireceğinizi yorum kısmına yazınız. Lütfen bir seferde birden fazla sayfa almayınız!

  3. Projeyi yerel makinenize clone'layınız. Sayfayı çevirdiğinizde commit ederek, pull request gönderiniz.

  4. Commit mesajlarini ingilizce yaziniz.

  5. Commit mesajlarinda gecmis zaman formu kullanmayiniz. translated tutorial page yerine translate tutorial page. ya da fixed a typo in docs yerine fix a typo in docs.

Tercüme etmeden önce, çeviri kurallarını mutlaka okuyunuz.

İlgili tartışmalara dahil olmak için Slack #tr kanalına katılın.

Maintainer List

For New Translators

To translate a page:

  1. Check that no one else has claimed your page in the checklist and comments below.
  2. Comment below with the name of the page you would like to translate. Please take only one page at a time.
  3. Clone this repo, translate your page, and submit a pull request!

Before contributing, read the glossary and style guide (once they exist) to understand how to translate various technical and React-specific terms.

Please be prompt with your translations! If you find that you can't commit anymore, let the maintainers know so they can assign the page to someone else.

For Maintainers

When someone volunteers, edit this issue with the username of the volunteer, and with the PR. Ex:

When PRs are merged, make sure to mark that page as completed!

Core Pages

To do before releasing as an "official" translation. Please translate these pages first.

Basics

API Reference

Navigation

These are the navigation links that appear in the sidebar. Possibly wait until
the corresponding sections are translated to do these.

Next Steps

These are the next most important translations, ordered by importance:

Installation

Hooks

Everyone is hooked on hooks! People are really excited for these and it would be great for them to be translated.

Concurrent Mode (New)

  • Adopting Concurrent Mode content/docs/concurrent-mode-adoption.md (@aakay) (#202)
  • Introducing Concurrent Mode content/docs/concurrent-mode-intro.md (@ataberkgrl ) (#253)
  • Concurrent UI Patterns content/docs/concurrent-mode-patterns.md
  • Concurrent Mode API Reference content/docs/concurrent-mode-reference.md (@ahmett) (#210)
  • Suspense for Data Fetching content/docs/concurrent-mode-suspense.md

Warnings

These are the pages that you get when you click the links in the console (e.g. https://reactjs.org/warnings/dont-call-proptypes.html). People tend to search these, so please don't translate the error message itself.

Advanced Guides

FAQ

Contributing

Priority: Low

  • How to Contribute
  • Codebase Overview
  • Implementation Notes
  • Design Principles

Components

Components in src/components that have some text in them.

Additional Translations

These are not the primary translation targets.

Translation for Internal / External

We need to decide this to make it standard and consistent. An example of usage:

A Component Using External Plugins

  1. Harici Eklentiler Kullanan Bir Bileşen
  2. Dış Eklentiler Kullanan Bir Bileşen

Internal state data

  1. Dahili State Verisi
  2. İç State Verisi

Internal:


External:


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.