You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request - Canvas API Implementation #17614
I don't want to belittle your app's needs, but you sound needlessly demanding with
This is a crucial feature request.
...
We need Canvas API fully supported in React Native ASAP.
Anyway, this kind of stuff does not really belong to the core React Native. They're probably going to remove WebView component out of the core API soon too. You'd have better luck using something like https://www.npmjs.com/package/react-native-canvas or alternatives to canvas such as:
Canvas API leverages JavaScript for drawing UI. and React Native is javascript-based.
Not totally correct. Canvas is an HTML5 API. Similarly Node.JS servers can have access to the file system, creating HTTP servers, and creating child processes. These things are not standard JavaScript libraries, they're part of Node.JS offerings. With React Native, you have 3rd JavaScript environment, where there's no window or document objects, no LocalStorage (but AsyncStorage)...
It's true that RN does polyfill stuff like fetch or navigator.geolocation to be compatible with browsers, but it does not promise to bring entire browser API into its JavaScript runtime.
Anyways I'll let a dev from FB team comment, but they're probably going to repeat my comment.
Activity
hey99xx commentedon Jan 16, 2018
I don't want to belittle your app's needs, but you sound needlessly demanding with
Anyway, this kind of stuff does not really belong to the core React Native. They're probably going to remove WebView component out of the core API soon too. You'd have better luck using something like https://www.npmjs.com/package/react-native-canvas or alternatives to canvas such as:
I don't know where the expectation that HTML
<canvas>API would be supported out of the box comes from. You are not developing a web app with RN.hey99xx commentedon Jan 16, 2018
Not totally correct. Canvas is an HTML5 API. Similarly Node.JS servers can have access to the file system, creating HTTP servers, and creating child processes. These things are not standard JavaScript libraries, they're part of Node.JS offerings. With React Native, you have 3rd JavaScript environment, where there's no
windowordocumentobjects, noLocalStorage(butAsyncStorage)...It's true that RN does polyfill stuff like
fetchornavigator.geolocationto be compatible with browsers, but it does not promise to bring entire browser API into its JavaScript runtime.Anyways I'll let a dev from FB team comment, but they're probably going to repeat my comment.
hramos commentedon Jan 16, 2018
I have nothing to add to @hey99xx's comments. Closing as we don't typically track feature requests here, only bug reports.