jwt-auth-example | Authentication library
kandi X-RAY | jwt-auth-example Summary
kandi X-RAY | jwt-auth-example Summary
jwt-auth-example
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of jwt-auth-example
jwt-auth-example Key Features
jwt-auth-example Examples and Code Snippets
Community Discussions
Trending Discussions on jwt-auth-example
QUESTION
I'm building an application with React and Redux.
I have an Account component that fetches data from the server in the componentWillMount
method. While the data is being fetched, the component must show the "loading" text, so I've added the "isFetching" property to the account reducer. This property is set to true while data is fetching from the server.
The problem is, that while data is being fetched, the value of the "isFetching" property in the render
method is false, while at the same time the value of store.getState().account.isFetching
is true (as it must be). This causes the exception, because this.props.isFetching
is false, so the code is trying to show the this.props.data.protectedString
while the data
is still being loaded from the server (so it is null).
I assume that the mapStateToProps bind some wrong value (maybe the initial state), but I cannot figure out why and how can I fix it.
Here is my AccountView code:
...ANSWER
Answered 2017-Oct-24 at 00:42Isn't your ternary statement switched? Your render function has this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jwt-auth-example
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page