Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Also, wenn man mit React schtreibt, schreibt man das ja quai alles in JS und nutzt halt eben nich JSX und die Libary die React mitbringt. Es ist ja nun so, dass es die Props, state und Hooks gibt und son Zeugs. Nun gibt es auch sowas, wie useState, useEffekt e.c.t, dafür muss man aber eine Funktion schreiben, soweit ich das weis kann man das nicht innerhalb einer Klasse nutzen (oder ich weiss zumindest nicht wie, bin halt noch anfänger).

Diese Hooks zu nutzen macht es halt sehr angenehm, jetzt hab ich aber auch immer mal wieder gelesen, dass die wohl das ein oder andere Mal Probleme verursachen können. Ist bei meinen Tests bisher noch nicht aufgefallen, aber da habt ihr vielleicht mehr Erfahrung mit.

Ich bin jetzt kein Profi in React, aber ein Blick in die Doku sagt mir, dass man mit UseState den (App-)State auch ohne Klasse nutzen kann. Ich weiß jetzt nicht, wie wichtig das für einen Anfänger ist, aber ich würde als erstes bei den Komponenten bleiben und dort die ganzn setState()-Sachen verwenden und noch gar nicht darüber nachdenken, wie man außerhalb einer Komponente auf den State zugreifen kann. Das ist dann evtl. für Edge-Cases interessant. Was nicht heißt, dass man sich nicht ums State-Management kümmern soll, das ist m.M. nach sehr wichtig, geht dann aber eher in Richtung Redux, MobX, etc. 

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.