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

Don't update if unchanged #15

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Empact
Copy link

@Empact Empact commented Jun 9, 2016

This reduces the number of cases in which the contents are re-rendered, specifically handling the source content case and the single unchanged string child case.

src/index.js Outdated
@@ -4,6 +4,12 @@ import React from 'react';
import Markdown from 'remarkable';

var Remarkable = React.createClass({
propTypes: {
container: React.PropTypes.string,
Copy link
Contributor

Choose a reason for hiding this comment

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

I know the PR getting old, but accessing PropTypes from the main React package is deprecated now.

@mxstbr
Copy link
Collaborator

mxstbr commented Sep 26, 2017

Mind rebasing the changes? Thanks!

If there are no children, then the output could not have changed in this
case.
This case is equivalent to the unchanged source case.
@Empact
Copy link
Author

Empact commented Sep 26, 2017

Done - note I haven't tested this recently so would be good to test it out!

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.

None yet

3 participants