There is none when it comes to file extensions. Your bundler/transpiler/whatever takes care of resolving what type of file contents there is.
There are however some other considerations when deciding what to put into a .js
or a .jsx
file type. Since JSX isn’t standard JavaScript one could argue that anything that is not “plain” JavaScript should go into its own extensions ie., .jsx
for JSX and .ts
for TypeScript for example.
There’s a good discussion here available for read
Related Posts:
- React.js: Set innerHTML vs dangerouslySetInnerHTML
- Loop inside React JSX
- Loop inside React JSX
- how to render a react component using ReactDOM Render
- Console logging for react?
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Maximum call stack size exceeded error
- How to properly use jsPDF library
- Can I use complex HTML with Twitter Bootstrap’s Tooltip?
- Invariant Violation: Objects are not valid as a React child
- Invariant Violation: Objects are not valid as a React child
- Google Chrome Uncaught (in promise) DOMException while playing AUDIO
- “SyntaxError: Unexpected token < in JSON at position 0"
- What is Virtual DOM?
- How to make a word underline in Markdown
- ChartJS beginAtZero, min, max doesn’t work
- How do I check whether a checkbox is checked in jQuery?
- How to use Redirect in the new react-router-dom of Reactjs
- how to fix : ” TypeError: Cannot read property ‘addEventListener’ of null”…?//
- Cannot set property InnerHTML of null [duplicate]
- ReferenceError: $ is not defined
- How to fix “Cannot read property ‘addEventListener’ of null” error [duplicate]
- How do I check whether a checkbox is checked in jQuery?
- React – uncaught TypeError: Cannot read property ‘setState’ of undefined
- jQuery document.createElement equivalent?
- Understanding unique keys for array children in React.js
- (Google Map API) Geocode was not successful for the following reason: REQUEST_DENIED
- How to do a redirect to another route with react-router?
- Jest spy on functionality
- Difference between npx and npm?
- How to make a word underline in Markdown
- Pure JavaScript equivalent of jQuery’s $.ready() – how to call a function when the page/DOM is ready for it [duplicate]
- How to play audio?
- How to play audio?
- How can I scroll to an element using jQuery?
- Reactjs – Form input validation
- jQuery.click() vs onClick
- jQuery Get Selected Option From Dropdown
- Include another HTML file in a HTML file
- TypeScript React.FC
confusion - Error Running React Native App From Terminal (iOS)
- Check if checkbox is checked with jQuery
- Axios Delete request with body and headers?
- Can’t resolve module (not found) in React.js
- Add swipe left/right to web page, but use default swipe up/down
- How to add jQuery code into HTML Page
- How can I get the data-id attribute?
- Check if checkbox is checked with jQuery
- How to implement navbar using react
- How to resolve the C:\fakepath?
- Understanding React-Redux and mapStateToProps()
- What is the meaning of == $0 that is shown in inspect element of google chrome for the selected element [duplicate]
- React this.setState is not a function
- Parse Error: Adjacent JSX elements must be wrapped in an enclosing tag
- ‘react-scripts’ is not recognized as an internal or external command
- After $npm install, Getting Error: Cannot find module ‘../lib/utils/unsupported.js’
- React Native: this.setState is not a function
- React: trigger onChange if input value is changing by state?
- In reactJS, how to copy text to clipboard?
- Angular: mat-form-field must contain a MatFormFieldControl
- SyntaxError: Adjacent JSX elements must be wrapped in an enclosing tag
- (change) vs (ngModelChange) in angular
- You should not use Route or withRouter() outside a Router when using react-router 4 and styled-component in react
- React-Router only one child
- Bootstrap Dropdown menu is not working
- What does the className attribute mean in JSX?
- What is prevState in ReactJS? [duplicate]
- React with ES7: Uncaught TypeError: Cannot read property ‘state’ of undefined
- jquery SlideToggle effect in upward direction?
- React Hook Warnings for async function in useEffect: useEffect function must return a cleanup function or nothing
- Change Background color (css property) using Jquery
- Setting a backgroundImage With React Inline Styles
- React – TypeError: Cannot read property ‘props’ of undefined
- Failed to load resource: net::ERR_FILE_NOT_FOUND loading json.js
- Get class name using jQuery
- How to clear the canvas for redrawing
- What is the difference between state and props in React?
- How to pass props to {this.props.children}
- React eslint error missing in props validation
- Adding options to select with javascript
- OnChange event using React JS for drop down
- Export html table data to Excel using JavaScript / JQuery is not working properly in chrome browser
- Set timeout for ajax (jQuery)
- ESLint Parsing error: Unexpected token
- How does the data-toggle attribute work? (What’s its API?)
- React Context vs React Redux, when should I use each one?
- Setting onSubmit in React.js
- How to import image (.svg, .png ) in a React Component
- CSS height 100% percent not working
- JavaScript get element by name
- Use images like checkboxes
- How to read xml file contents in jQuery and display in html elements?
- HTML5 Local storage vs. Session storage
- Completely disable scrolling of webpage
- Uncaught TypeError: Cannot read property ‘props’ of null
- TypeError: Cannot Set property ‘onclick’ of null
- ReactJS: setTimeout() not working?
- Express Render not working return error: No default engine was specified and no extension was provided
- How do I scroll to an element using JavaScript?