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

Add guidelines and instructions for porting to React #628

Merged
merged 2 commits into from
Mar 17, 2018

Conversation

sambhav
Copy link
Collaborator

@sambhav sambhav commented Mar 11, 2018

No description provided.

HACKING.md Outdated
```
where the `convert_to_json` is a function that converts `prop_val` to its appropriate
JSON representation. If `prop_val` is an entity that has a `TO_JSON` sub defined, it will
most probably be called by the Server and you can simply pass `prop_val`.
Copy link
Member

Choose a reason for hiding this comment

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

We should probably remove "most probably" since it should be called, and that makes it sounds more mysterious than it is. :P

HACKING.md Outdated
[%~ React.embed(c, 'relative/path/to/component/from/root', { prop_name => prop_val }) ~%]
```
3. You can access the CatalystContext via the variable `$c`.
4. To communicate between Perl and Node Server(which renders React components for us), you need to
Copy link
Member

Choose a reason for hiding this comment

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

"between the Perl and Node servers (which" (+space after servers)

HACKING.md Outdated
* All components must be type-annotated. We use flow for static type checks. You can find more
about it at [flow docs](https://flow.org/en/docs/).
* Global types are defined in `root/types.js`. They can be used without imports.
* Make sure your JS files conform to our ESlint setup.
Copy link
Member

Choose a reason for hiding this comment

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

Not sure we explain how to run eslint anywhere yet either.

@mwiencek
Copy link
Member

This looks very good. 👍

@mwiencek mwiencek merged commit ac411c7 into metabrainz:master Mar 17, 2018
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

2 participants