React-share Can't Share LinkedIn Article

I tried to share article current URL to social media such as Facebook, Twitter & LinkedIn using react-share package. I have some issues at share the page: null (URL:


import React from 'react';
import { LinkedinShareButton } from "react-share";
let shareUrl = window.location.href;

export default class Share extends React.Component {
   render() {
      <LinkedinShareButton url={`${shareUrl}`}>
         <div className="icon-socmed-white linkedin">

What weird of this case, if I tried to share the homepage page as share article it'll works just fine.



Seems like linkedin has removed their support for sharing URLs. If you check the documentation ( it never mentions sharing using a URL.

Sharing the homepage probably still works because they missed removing support for that type of URL yet.

Most likely react-share has to be updated/will no longer support LinkedIn. You can follow the documentation above to know how to implement the sharing yourself.

LE: here is another stackoverflow answer saying the same thing: How to make a custom LinkedIn share button