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.

[angular]: forceReRender does nothing

See original GitHub issue

Describe the bug forceReRender method doen’t rerender story for angular applications

What I’m trying to achieve: destroy and init root angular component or application in general, but forceRerender doesn’t do that.

To Reproduce Can be easily reproduced with clean project like

npx ng new app;
cd app;
npx sb init;

System Environment Info:

System: OS: macOS 10.15.7 CPU: (16) x64 Intel® Core™ i9-9880H CPU @ 2.30GHz Binaries: Node: 12.21.0 - ~/.nvm/versions/node/v12.21.0/bin/node npm: 6.14.11 - ~/.nvm/versions/node/v12.21.0/bin/npm Browsers: Chrome: 90.0.4430.93 Firefox: 86.0.1 Safari: 13.1.3 npmPackages: @storybook/addon-actions: 6.2.8 => 6.2.8 @storybook/addon-essentials: 6.2.8 => 6.2.8 @storybook/addon-links: 6.2.8 => 6.2.8 @storybook/angular: 6.2.8 => 6.2.8 @storybook/theming: 6.2.8 => 6.2.8

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ThibaudAVcommented, May 24, 2021

I understand the request I have already discussed with @shilman

I wanted to add a story flag only for angular to disable the optimization on some story. But it seems better to make a generic solution for all frameworks

I also thought of adding a boolean in the forceReRender() method to change the value of the forceRender sent to the story. but 🤷‍♂️

0reactions
nickbullockcommented, Feb 9, 2022

Hey @shilman @ThibaudAV, any news on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to manually force a rerender of a component in Angular2?
You can manually re-render using application ref. Inject ApplicationRef to your component. constructor(appRef: ApplicationRef) {}.
Read more >
Force Angular to rerender - Developapa
On rerender you can just clear the content of the ng-container and create a new component from the ng-element . Your template looks...
Read more >
5 Ways to Avoid React Component Re-Renderings
In this article, I will discuss 5 methods to avoid unnecessary re-renderings in React components. 1. Memoization using useMemo() and UseCallback() Hooks.
Read more >
How to Force Re-Render a React Component & Should you ...
Unfortunately, Functional Component doesn't have a forceUpdate method for ease of use. You can use useState hook to simulate an update or create ......
Read more >
What is Render in React and How Do You Force it? - Telerik
What exactly is Render in React, how can we force a class or functional ... Now you have seen how to force re-render...
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