Skip to content

Conversation

chrisvxd
Copy link
Collaborator

Opening for discussion.

This is just a proposal based on our offline discussions regarding focussing the README on code.

If you decide to move forwards with this / something like this, still need to:

  • Finish features list
  • Actually test code snippets
  • Figure out if it flows with other docs
  • Tweak anything else ¯\(ツ)

README.md Outdated
@@ -1,21 +1,89 @@
# React from Markup
# react-from-markup
> Convert static markup into React components, so you can control React props in a static environment.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think I like this. Would probably prefer to stick with original.

Copy link
Owner

Choose a reason for hiding this comment

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

What if it was simply...

Control your React props with HTML

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hm, I'm not sure I would understand what that meant. What about mentioning data- attrs.

Control your React props with data- attributes

Or similar to your original

Declare your React props with data- attributes

Copy link
Owner

Choose a reason for hiding this comment

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

(oh boy, it's been two months and I still haven't moved on this - really sorry!)

I see/like what you're going for, but it also goes beyond data- props - you can grab a node's textContent, too, or have rehydratable children.

Just spitballing here. Goes further off the rails, and more I'm-pitching-to-a-VC, the further down the list you go.

Set your React props in your HTML
Set your React props from your CMS
Get your props from the markup
Use React with other templating engines
Use React on any website
React, for when React can't be used

And then the pure honesty version:

React, but very slightly worse, but it works everywhere.

Copy link
Owner

@simon360 simon360 left a comment

Choose a reason for hiding this comment

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

Love the route you've taken here. Have a few quick thoughts, but am inclined to switch over to this pretty quickly - much more approachable.

README.md Outdated
@@ -1,21 +1,89 @@
# React from Markup
# react-from-markup
> Convert static markup into React components, so you can control React props in a static environment.
Copy link
Owner

Choose a reason for hiding this comment

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

What if it was simply...

Control your React props with HTML

README.md Outdated
```

`react-from-markup` is intended to make it possible to use React components on these legacy systems, _without changing the way you write your React components_. It provides tools to simplify the mapping from `data-` attributes into React props, and _can even handle React children_.
using a `rehydrator`:
Copy link
Owner

Choose a reason for hiding this comment

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

Pedantic nitpick (sorry in advance!)

rehydrator isn't a piece of code, especially in the new react-from-markup world - it's a term. Could we italicize it instead of codeing it?

README.md Outdated
}
```

This is extremely useful for changing React props in a non-React environment, like a CMS with it’s own templating language.
Copy link
Owner

Choose a reason for hiding this comment

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

(again, sorry)

it's -> its

ShowMore: showMoreRehydrator
});
```

Copy link
Owner

Choose a reason for hiding this comment

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

May need a brief note on markup containers here - don't want to overload the "simple get-up-and-running"-ness here, but without a container, react-from-markup doesn't do anything.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added!

@chrisvxd
Copy link
Collaborator Author

chrisvxd commented Oct 8, 2018

@simon360 I've addressed all comments in your PR and tweaked it a bit. Please make sure you check over the todo list before merging!

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