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

Feature Request - Canvas API Implementation #17614

Closed
ghost opened this issue Jan 15, 2018 · 5 comments
Closed

Feature Request - Canvas API Implementation #17614

ghost opened this issue Jan 15, 2018 · 5 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ghost
Copy link

ghost commented Jan 15, 2018

Is this a bug report?

This is a crucial feature request...

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS Sierra 10.12.6
Node: 8.4.0
Yarn: 0.27.5
npm: 5.4.0
Watchman: 4.7.0
Xcode: Xcode 8.3.3 Build version 8E3004b
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react-native: 0.48.1 => 0.48.1
react: 16.0.0-alpha.12 => 16.0.0-alpha.12

Target Platform: iOS (10.3)

Steps to Reproduce

HTML Canvas API can do amazing things for UI but it's not available in React Native....

  1. Try Canvas API on React Native
  2. Nothing will happen...

Expected Behavior

React Native would fully support Canvas API
https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API

Actual Behavior

React Native doesn't respond to Canvas API... that is a huge miss for talented UI designers.
See what you can do with Canvas API here:
https://codepen.io/search/pens?q=canvas+api&limit=all&type=type-pens

and please imagine what if you could use them on React Native.

Reproducible Demo

All React Native apps are demos for this problem.
We need Canvas API fully supported in React Native ASAP.....

@hey99xx
Copy link

hey99xx commented Jan 16, 2018

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:

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.

@ghost
Copy link
Author

ghost commented Jan 16, 2018

I'm beginner at React Native... I've been working on Cordova for a while.
Yes, you're right. There's already a plugin for this!

But I think it will be amazing if we can use Canvas API for building UI of RN.
Don't you think so? there are already so many things have been accomplished using Canvas API and Canvas API leverages JavaScript for drawing UI. and React Native is javascript-based.

I want to see both Canvas API, Web Audio API professionally implemented on RN by Facebook team.

@hey99xx
Copy link

hey99xx commented Jan 16, 2018

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.

@hramos
Copy link
Contributor

hramos commented 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.

@hramos hramos closed this as completed Jan 16, 2018
@ghost
Copy link
Author

ghost commented Jan 16, 2018

Hello Facebook Dev team,

Would you please make Web Audio API work on React Native?

https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API

Web Audio already provides complete solution for audio... it has filters, delays, reverb, convolution reverb, audio playback, and many more. I wonder why this was omitted.

@facebook facebook locked as resolved and limited conversation to collaborators Jan 16, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jan 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants