{"action":"created","issue":{"url":"https://api.github.com/repos/thejameskyle/babel-plugin-handbook/issues/20","labels_url":"https://api.github.com/repos/thejameskyle/babel-plugin-handbook/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/thejameskyle/babel-plugin-handbook/issues/20/comments","events_url":"https://api.github.com/repos/thejameskyle/babel-plugin-handbook/issues/20/events","html_url":"https://github.com/thejameskyle/babel-plugin-handbook/issues/20","id":120525029,"number":20,"title":"how to change `this.foo(a, b)` to `this._lookup('foo', [a, b])`?","user":{"login":"faceyspacey","id":154732,"avatar_url":"https://avatars.githubusercontent.com/u/154732?v=3","gravatar_id":"","url":"https://api.github.com/users/faceyspacey","html_url":"https://github.com/faceyspacey","followers_url":"https://api.github.com/users/faceyspacey/followers","following_url":"https://api.github.com/users/faceyspacey/following{/other_user}","gists_url":"https://api.github.com/users/faceyspacey/gists{/gist_id}","starred_url":"https://api.github.com/users/faceyspacey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faceyspacey/subscriptions","organizations_url":"https://api.github.com/users/faceyspacey/orgs","repos_url":"https://api.github.com/users/faceyspacey/repos","events_url":"https://api.github.com/users/faceyspacey/events{/privacy}","received_events_url":"https://api.github.com/users/faceyspacey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-05T03:09:39Z","updated_at":"2015-12-05T06:10:37Z","closed_at":null,"body":"I'm looking to do some basic transpilations of my jsx code. How would you accomplish something like that? \r\n\r\nAnother simple transpilation I'm looking to make is:\r\n\r\n`<MyComponent />`\r\nto:\r\n`<MyComponent parent={this} />`\r\n\r\nPerhaps simple *regex/replace* style examples like these would make for a good section of the handbook as well. The problem of course with regexes is that they can't handle recursive replaces well. For example:\r\n\r\n`this.foo(this.bar())`\r\n would become:\r\n`this.lookup('foo', [this.bar(]));`\r\n\r\nI imagine a lot of people may have similar challenges where they are stuck with regexes and need to upgrade to the next more powerful thing, i.e. a full on parser, but don't have a lot of experience there. Babel (and its plugin architecture) could capitalize on this, essentially, sales funnel, and be the defacto solution for people *needing* to \"level up\" as they face those problems."},"comment":{"url":"https://api.github.com/repos/thejameskyle/babel-plugin-handbook/issues/comments/162150973","html_url":"https://github.com/thejameskyle/babel-plugin-handbook/issues/20#issuecomment-162150973","issue_url":"https://api.github.com/repos/thejameskyle/babel-plugin-handbook/issues/20","id":162150973,"user":{"login":"faceyspacey","id":154732,"avatar_url":"https://avatars.githubusercontent.com/u/154732?v=3","gravatar_id":"","url":"https://api.github.com/users/faceyspacey","html_url":"https://github.com/faceyspacey","followers_url":"https://api.github.com/users/faceyspacey/followers","following_url":"https://api.github.com/users/faceyspacey/following{/other_user}","gists_url":"https://api.github.com/users/faceyspacey/gists{/gist_id}","starred_url":"https://api.github.com/users/faceyspacey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faceyspacey/subscriptions","organizations_url":"https://api.github.com/users/faceyspacey/orgs","repos_url":"https://api.github.com/users/faceyspacey/repos","events_url":"https://api.github.com/users/faceyspacey/events{/privacy}","received_events_url":"https://api.github.com/users/faceyspacey/received_events","type":"User","site_admin":false},"created_at":"2015-12-05T06:10:37Z","updated_at":"2015-12-05T06:10:37Z","body":"I'm just stating a specific challenge I'm looking to figure out, and explaining how it might be a common problem a lot of your users or potential users might have. Specifically: recursively replacing code based on a regex, or of a certain identifier type, etc."}}