question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v11 proposed changes for React

See original GitHub issue

Disclaimer: this issue is meant for capturing breaking changes that we’d like to see changed in v11 to help address some of the consistency issues across components. None of these changes are final, or implemented, and are subject to change.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
joshblackcommented, Oct 20, 2019

Proposal: useNotification

This hook would provide a way to send notifications and manage the UX behavior of doing this, namely:

  • How many notifications are shown at a given point in time
  • Where do notifications appear on the screen (and how through animation)
  • How a notification gets dismissed
  • How notifications get buffered

API

function Usage() {
  const [send] = useNotification();

  useEffect(() => {
    // Send a notification through an effect
    send('Basic notification');
  }, [send]);

  // Send a notification through an event
  function onClick() {
    send('Notification from an event');
  }

  // Send a specific type of notification
  function onSuccess() {
    send('Success notification', {
      type: NotificationTypes.success,
    });
  }

  // Be notified when a notification is dismissed
  send('Some notification', {
    onDismiss(message) {
      console.log('Notification was dismissed');
    },
  });
}
0reactions
joshblackcommented, Aug 20, 2020

Thanks all for weighing in! Going to integrate these suggestions into our roadmap and then out into planning issues 👀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrate to v11 Guide - React Flow
The biggest change is the new package name reactflow and the new repo structure. React Flow is now managed as a monorepo and...
Read more >
Carbon v11 - Medium
These changes involve mostly name changes. The values and roles of these tokens remain the same between v10 and v11. To learn more...
Read more >
React Flow on Twitter: "React Flow v11 is out now!! You can ...
You can read about all of the changes that come with this major update in ... Edge Routing & Selection - New Background...
Read more >
Realm JavaScript v11: A Step Forward for React Native
With this release, we have built underlying support for the new Hermes JS engine, now becoming the standard for React Native applications ...
Read more >
Guide - Carbon Design System
Starting in v11, the React components for Carbon live in the @carbon/react package. Alternatively, you can continue to use carbon-components as ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found