{"action":"created","issue":{"url":"https://api.github.com/repos/matthewwithanm/react-inlinesvg/issues/5","labels_url":"https://api.github.com/repos/matthewwithanm/react-inlinesvg/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/matthewwithanm/react-inlinesvg/issues/5/comments","events_url":"https://api.github.com/repos/matthewwithanm/react-inlinesvg/issues/5/events","html_url":"https://github.com/matthewwithanm/react-inlinesvg/issues/5","id":55808268,"number":5,"title":"Dynamic `src` attrbute.","user":{"login":"wires","id":315734,"avatar_url":"https://avatars.githubusercontent.com/u/315734?v=3","gravatar_id":"","url":"https://api.github.com/users/wires","html_url":"https://github.com/wires","followers_url":"https://api.github.com/users/wires/followers","following_url":"https://api.github.com/users/wires/following{/other_user}","gists_url":"https://api.github.com/users/wires/gists{/gist_id}","starred_url":"https://api.github.com/users/wires/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wires/subscriptions","organizations_url":"https://api.github.com/users/wires/orgs","repos_url":"https://api.github.com/users/wires/repos","events_url":"https://api.github.com/users/wires/events{/privacy}","received_events_url":"https://api.github.com/users/wires/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-28T20:08:10Z","updated_at":"2015-04-07T14:53:50Z","closed_at":null,"body":"Hi,\r\n\r\nI thought it should be possible to change the `src` attribute and load a different file (or pull from cache).\r\nI put together a little test demonstrating what I'm talking about, see https://github.com/wires/react-inlinesvg-test \r\n\r\nLook at [`index.js`](https://github.com/wires/react-inlinesvg-test/blob/master/index.js), this is where the \"meat\" is...\r\n\r\n```js\r\nvar React = require(\"react\");\r\nvar ISvg = require(\"react-inlinesvg\");\r\n\r\nvar App = React.createClass({\r\n    propTypes: {\r\n        index: React.PropTypes.number.isRequired\r\n    },\r\n    render: function () {\r\n        var FILES = [\"test-a.svg\", \"test-b.svg\"];\r\n        var fn = FILES[this.props.index];\r\n        console.log(fn)\r\n        return (<ISvg src={ fn }/>);\r\n    }\r\n});\r\n\r\nwindow.addEventListener('DOMContentLoaded', function(){\r\n    setInterval(function(){\r\n        var i = Math.floor(Math.random()*2); // 0 or 1\r\n        React.render(\r\n            <App index={i}/>\r\n            , document.getElementById('content'));\r\n    }, 500);\r\n});\r\n```\r\n\r\nI ran into this when trying to use `react-inlinesvg` with `react-router`, it wouldn't change page.\r\n\r\nAny thoughts?\r\n\r\n "},"comment":{"url":"https://api.github.com/repos/matthewwithanm/react-inlinesvg/issues/comments/90593545","html_url":"https://github.com/matthewwithanm/react-inlinesvg/issues/5#issuecomment-90593545","issue_url":"https://api.github.com/repos/matthewwithanm/react-inlinesvg/issues/5","id":90593545,"user":{"login":"dubert","id":1843672,"avatar_url":"https://avatars.githubusercontent.com/u/1843672?v=3","gravatar_id":"","url":"https://api.github.com/users/dubert","html_url":"https://github.com/dubert","followers_url":"https://api.github.com/users/dubert/followers","following_url":"https://api.github.com/users/dubert/following{/other_user}","gists_url":"https://api.github.com/users/dubert/gists{/gist_id}","starred_url":"https://api.github.com/users/dubert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dubert/subscriptions","organizations_url":"https://api.github.com/users/dubert/orgs","repos_url":"https://api.github.com/users/dubert/repos","events_url":"https://api.github.com/users/dubert/events{/privacy}","received_events_url":"https://api.github.com/users/dubert/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T14:53:50Z","updated_at":"2015-04-07T14:53:50Z","body":"If you add a key, it should work. React needs to know that it's a different image."}}