Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for SSR #7

Closed
wants to merge 1 commit into from
Closed

Conversation

puneetsngh
Copy link

this fix will render the component text on server.

earlier, it was only rendering this on the client

this fix will render the component text on server.

earlier, it was only rendering this on the client
@@ -8,7 +8,7 @@ export default class ReadMoreReact extends React.Component {
this.state = { displaySecondary: false, primaryText: "", secondaryText: "", readMoreText: this.props.readMoreText };
}

componentDidMount() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ComponentWillMount is being deprecated, I can put it in the constructor but want to verify if that is the right path forward:
styled-components/styled-components#1575

@alexandersmanning
Copy link
Owner

Updated to be in the constructor, see version 1.09

@puneetsngh puneetsngh closed this Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants