Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

npm react-syntax-highlighter

import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
import { dark } from 'react-syntax-highlighter/dist/esm/styles/prism';
const Component = () => {
  const codeString = '(num) => num + 1';
  return (
    <SyntaxHighlighter language="javascript" style={dark}>
      {codeString}
    </SyntaxHighlighter>
  );
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery call a class 
Javascript :: find object in array 
Javascript :: js detect object has key 
Javascript :: isfinite javascript 
Javascript :: luxon plus 
Javascript :: what is a for loop in javascript 
Javascript :: appearing datepicker behind the modal 
Javascript :: Create Your Own Node Module 
Javascript :: react barcode scanner 
Javascript :: random number in js 
Javascript :: console.log(...) is not a function 
Javascript :: javascript functions 
Javascript :: ajax laravel get values from form 
Javascript :: find object from list 
Javascript :: convert string to int javascript 
Javascript :: Add array to formData react js 
Javascript :: react-native make android apk 
Javascript :: javascript not equal 
Javascript :: react native update state object inside object 
Javascript :: jsx example 
Javascript :: how to use fetch in gatsby 
Javascript :: d3.js 
Javascript :: jest test navlink 
Javascript :: javascript remove function from object 
Javascript :: autocannon 
Javascript :: javascript foreach in object 
Javascript :: get query params 
Javascript :: smooth scroll react 
Javascript :: checked unchecked through js 
Javascript :: javascript function with string parameter 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =