Comments (1)
randomWords returns a word to your code, which is then responsible for doing something with it. It does not write things to React, or the console, or anywhere else. It just generates words.
The simplest thing you can do with it is pass it to console.log, but there is no restriction on what you do with it. For instance, you could write something like this in vanilla JavaScript:
document.querySelector('#some-input-element').value = randomWords();
And now the input element with that id would contain the word.
In a React component, you could use random-words to initialize a property in this.state
, but this isn't a feature of random-words itself, because random-words is only responsible for its own job (returning a word to your code).
from random-words.
Related Issues (15)
- Include corpus size in readme HOT 3
- Exact size of random word HOT 8
- Unexpected token: name (rightSize) [./~/random-words/index.js:260,0] HOT 1
- Request - generate words starting with letter HOT 18
- Request - Difference between parts of speech HOT 8
- Words being made plural that should not be HOT 1
- Publish latest version to registry HOT 5
- Please update the version HOT 7
- Add a maxsize on the words
- Syntax error with release 1.3.0 HOT 1
- Unable to use minLength HOT 5
- Export CommonJS version HOT 13
- IE10 error "Expected: ';'" HOT 3
- Transpiling HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from random-words.