Was getState() replaced or removed; is it now built in behavior?
See original GitHub issueTrying to continue using window.snapSaveState = () => getState();
with the new version @loadable/components
, and it seems to not be a module export anymore.
I have a purely static react app and have been using react-snap in conjunction with your guy’s beautiful getState
😃
How should I continue to maintain this functionality with @loadable/components
?
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Redux Fundamentals, Part 4: Store
The store has the current state value and reducer function inside of itself. getState returns the current state value. subscribe keeps an array ......
Read more >Wrong React hooks behaviour with event listener
This is a common problem for functional components that use the useState hook. The same concerns are applicable to any callback functions ...
Read more >Working with entity states - EF6 - Microsoft Learn
Deleted entities are deleted from the database and are then detached from the context. The following examples show ways in which the state ......
Read more >Authentication State Persistence | Firebase - Google
Supported types of Auth state persistence; Modifying the Auth state persistence; Overview of persistence behavior; Expected behavior across browser tabs.
Read more >How to Manage State in a React App – With Hooks, Redux ...
In modern React, we build our applications with functional components. ... a React component re-render (the other is a change in props).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here are options for anyone who will face this issue:
react-loadable@2.3.3
ConcurrentMode
unstable_ConcurrentMode
(at your own risk). Here is full example https://github.com/stereobooster/react-async-issue@loadable/component
, which will add backgetState
If we would drop the tone, there is a sense in those words.
Yes, this is open source. People provide you with results of their labor for free without any warranty or further promises. You can use, you can skip it. It is up to you.
Right, and you can spend your time to learn GraphQL (which is good in long-term, I guess, but will slow down you in the beginning) and spent some time writing transformation layer from the existing data source to Gatsby’s GraphQL.
Gatsby is a great tool and if you can use it (like you already know how to use it), go ahead and use it. From my experience, it has some barrier for novice users, like GraphQL and a need to write custom plugins to work with your data.
React-snap is for a different purpose, it is for the case when you already have some codebase and don’t want to invest time to rewrite in Gatsby or react-static or …
As of loadable-components, I use the previous version which has
getState()
. My hope is that eventually we will not need any external solution and will be able to useReact.lazy
, which is not the case right now.I tried:
and
The code above results in white flash (blink), but logically it shouldn’t